Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is no record for exporting CSV #75

Open
luidso opened this issue Jul 20, 2021 · 4 comments
Open

There is no record for exporting CSV #75

luidso opened this issue Jul 20, 2021 · 4 comments

Comments

@luidso
Copy link

luidso commented Jul 20, 2021

After following the steps, when using the grafana data exporter to export data, the task is added successfully, but the data is 0. Grafana log status = 400, and the size of CSV in the grafana data exporter is 0.
grafana:7.1.5
grafana-data-exporter:0.5.1
log:t=2021-07-20T09:13:08+0800 lvl=info msg="Request Completed" logger=context userId=0 orgId=1 uname= method=GET path=/api/datasources/proxy/2/api/v1/query_range status=400 remote_addr=ipv4 time_ms=19 size=119 referer=

@rozetko
Copy link
Member

rozetko commented Jul 20, 2021

hey @luidso!
which datasource are you trying to export data from?

@luidso
Copy link
Author

luidso commented Jul 20, 2021

prometheus

@luidso
Copy link
Author

luidso commented Jul 20, 2021

grafana-data-exporter log:0 day: 1626753801604ms -> 1626840201604ms
Data kit: fail while request data: Request failed with status code 400 query url: "/api/datasources/proxy/2/api/v1/query_range"
Response: status: 400, response data: {"status":"error","errorType":"bad_data","error":"invalid parameter "start": cannot parse "" to a valid timestamp"}, headers: {"content-type":"application/json","date":"Tue, 20 Jul 2021 10:03:26 GMT","x-content-type-options":"nosniff","x-frame-options":"deny","x-xss-protection":"1; mode=block","content-length":"119","connection":"close"}

(node:4898) UnhandledPromiseRejectionWarning: Error: Data kit: fail while request data: Request failed with status code 400
at /opt/prometheus/grafana-data-exporter-0.5.1/dist/server.js:32479:19
at Generator.throw ()
at rejected (/opt/prometheus/grafana-data-exporter-0.5.1/dist/server.js:32377:65)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
(node:4898) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 20)

It seems that the request URL has no parameters for splicing query? query=up&start=2021-07-19T20:10:30.781Z&end=2021-07-20T20:11:00.781Z&step=15s

@rozetko
Copy link
Member

rozetko commented Nov 1, 2022

Hey @luidso,

Grafana breaks the API all the time. If you really need this, we can fix it. Meanwhile, maybe you want to checkout this link?
https://www.patreon.com/corpglory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants