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

Grafana API is not working with the query_range using start and end params #87436

Open
kondurupurandhar opened this issue May 7, 2024 · 3 comments
Labels
needs more info Issue needs more information, like query results, dashboard or panel json, grafana version etc

Comments

@kondurupurandhar
Copy link

kondurupurandhar commented May 7, 2024

What happened?

I am building the curl commands to download the grafana report, while using the start and end time range in the query i am getting the error and not recognizing the start and end values. However the the same API call is working from POSTMAN.

Below is the API call:
curl -X GET '
https://FQDN/api/datasources/proxy/1/api/v1/query_range?query=sum%20%28rate%20%28container_cpu_usage_seconds_total{id=%22/%22,kubernetes_io_hostname=%22^.%2A$%22}[60m]%29%29%20/%20sum%20%28machine_cpu_cores{kubernetes_io_hostname=%22^.%2A$%22}%29%20%2A%20100&start=1715045400&end=1715074200&step=3600'-H
'Authorization: Basic xxxxxx'

@kondurupurandhar
Copy link
Author

kondurupurandhar commented May 15, 2024

Any help on this issue?

@tonypowa
Copy link
Contributor

hello @kondurupurandhar

Thank you for creating this issue.

Are there any errors on the server side? I.e any relevant Grafana server logs when you send this request?
if this is a client side error, what error do you get exactly?

Also, please provide:

  • Grafana platform (docker, binary, etc)
  • Grafana Version

@tonypowa tonypowa added the needs more info Issue needs more information, like query results, dashboard or panel json, grafana version etc label May 30, 2024
@tonypowa
Copy link
Contributor

One more question. Can you share the link to the API documentation where I can see the endpoint that you are calling? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs more info Issue needs more information, like query results, dashboard or panel json, grafana version etc
Projects
None yet
Development

No branches or pull requests

2 participants