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

Why are you POSTing to graphite /render? #1767

Closed
bydga opened this issue Apr 13, 2015 · 5 comments
Closed

Why are you POSTing to graphite /render? #1767

bydga opened this issue Apr 13, 2015 · 5 comments

Comments

@bydga
Copy link

bydga commented Apr 13, 2015

In the last grafana (1.9.x) you were calling graphite's /render method (with parameters like target, format=json, maxDataPoints etc..) with HTTP GET method. Now with v2 you switched to POST - however our graphite installations seems not to support this (accodring to our admins we have a graphite 0.9.12). Plus not even in the graphite render api docs, its never mentioned graphite should be POSTed - http://graphite.readthedocs.org/en/latest/render_api.html. The graphite webapp provides a /render endpoint for generating graphs and retrieving raw data. This endpoint accepts various arguments via query string parameters. These parameters are separated by an ampersand (&)

What do you think? Is your graphite working (i guess it is..) so what version do you run?

@torkelo
Copy link
Member

torkelo commented Apr 13, 2015

@bydga Grafana has always used POST by default, there was a config option added in Grafana v1.5 so that some users could change it a GET call.

Graphite has always supported POST for the render call simply because it allows for more queries and larger queries being batched in one render call (without hitting the querystring length limit).

It is very strange that this is failing for you, maybe you have some proxy infront of graphite that does not allow POSTs?

If you are running Graphite 0.9.12 you really need to upgrade to Graphite 0.9.13 to get the maxDataPoints parameter (without that feature Grafana can be really slow when querying over long time ranges due to graphite returning megabytes worth of points)

@bydga
Copy link
Author

bydga commented Apr 13, 2015

Hi, thanks for the reply.

You are right, i was overriding the http method in the config.js and i completely forgot about it now (as i am evaluating an upgrade to grafana 2). Is there a simmilar option in the config.ini in grafana 2 (cant find anything in the docs and ? We have some problems with running the POST /render requests against our graphite installation (no proxy in the way though...)

now i found outthat out problem has maybe a connection with: #28

@torkelo
Copy link
Member

torkelo commented Apr 13, 2015

no there is no option to use GET, its very strange that your graphite install does not handle it.

@bydga
Copy link
Author

bydga commented Apr 15, 2015

I guess the problem would be with the graphite 0.9.12. Definitely nothing you should be worried about.

@bydga bydga closed this as completed Apr 15, 2015
@bydga
Copy link
Author

bydga commented May 15, 2015

So i got back to this issue and finally found the answer to "POST not working to graphite".. We had the gunicorn dependency installed through distro packages, where the gunicorn version was really outdated (something around 15.x). After reinstalling gunicorn via pip (upgraded to 19.3), everything started to work. This info might help someone in the future :)

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