grafana / grafana

The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
https://grafana.com
GNU Affero General Public License v3.0
64.78k stars 12.11k forks source link

Graphite HTTP Request Error #385

Closed sammcj closed 10 years ago

sammcj commented 10 years ago

My graphiteUrl is configured as:

graphiteUrl: "http://graphite.mydomain.com",

visiting this url returns the standard graphite API page of 'no data' which is correct if no parameters have been passed to it.

torkelo commented 10 years ago

Do you not get the standard graphite web page? Or are you using graphite - api ?

torkelo commented 10 years ago

Please show result from chrome network tab, so I can see what error graphite render request returns

lefthand commented 10 years ago

Hello, it appears I'm hitting the same error. When I access the page in the browser it comes up correctly. Here is the response I got from the network tab.

https://gist.github.com/lefthand/e024da2eeaece6edf881

I'm running grafana in a vagrant instance locally while the graphite host is in a real server.

lefthand commented 10 years ago

I updated that gist with a little more / clearer information. The error is:

Exception Value: 'NoneType' object has no attribute 'startswith'

I noticed that I'm able to edit queries and it pulls in all the correct data so I can construct queries but I still get the 500 error when rendering the actual graph.

torkelo commented 10 years ago

@lefthand what is the graphite query you are trying this with? Graphite seems to think it is not a valid query.

lefthand commented 10 years ago

This happens with any query:

randomWalk('random walk')

lefthand commented 10 years ago

Thanks for looking at at this @torkelo (and thanks again for the shirt and Monitorama!)

I discovered that my graphite install only seems to like GET requests and not POST. Once I added

render_method: 'GET'

to my graphite settings that seems to have solved the problem for me. I tried added POST to Access-Control-Allow-Methods on my graphite apache config file but that didn't seem to help. I'd love to fully understand it but I'm happy for now.

@sammcj Does this solve your problem as well? Reading over issue #345 helped me sort it out.