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

POST http://192.168.4.161:8080/render 500 (INTERNAL SERVER ERROR) #325

Closed pythonjian closed 10 years ago

pythonjian commented 10 years ago

Hi when i try to create a new dashboard, there was a problem:

Oops! Graphite HTTP Request Error

POST http://loalhost:/render 500 (INTERNAL SERVER ERROR)

Remote Address:192.168.4.161:8084 Request URL:http://192.168.4.161:8084/render Request Method:POST Status Code:500 INTERNAL SERVER ERROR Request Headersview source Accept:application/json, text/plain, / Accept-Encoding:gzip,deflate,sdch Accept-Language:en,zh-CN;q=0.8,zh;q=0.6 Authorization:Basic bXlmbG9rOmZpbmRsYXc3NzA4 Connection:keep-alive Content-Length:174 Content-Type:application/x-www-form-urlencoded Host:192.168.4.161:8084 Origin:http://192.168.4.161:8083 Referer:http://192.168.4.161:8083/ User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36 Form Dataview sourceview URL encoded from:-6h until:now target:randomWalk(carbon.undefined,'random walk') target:randomWalk('random walk2') target:randomWalk('random walk3') format:json maxDataPoints:651 Response Headersview source Access-Control-Allow-Credentials:true Access-Control-Allow-Headers:origin, authorization, accept Access-Control-Allow-Methods:GET, OPTIONS Access-Control-Allow-Origin:http://192.168.4.161:8083 Connection:close Content-Length:1408 Content-Type:text/html; charset=utf-8 Date:Thu, 17 Apr 2014 14:43:57 GMT Server:Apache/2.2.15 (CentOS)

what should I do? :)

torkelo commented 10 years ago

It looks like you are sending invalid queries to graphite. Try removing the randomWalk function (it is just there to test graphite). You can remove the function by clicking its name and then the x icon. Or just remove the all the randomWalk queries and then click the Add query button to start with a new query.

Grafana visualizes the graphite expression in a way that is more easy to view and edit for example.

prod.apps.*.stats.count summarize(1h, sum) aliasByNode(2)

Is actually:

aliasByNode(summarize(prod.apps.*.stats.count, '2h', 'sum'), 2)

You can click the pen icon to view the underlying textual graphite target. In the case your case there is one graphite target that looks like this:

randomWalk(carbon.undefined,'random walk')

This is not valid, randomWalk does not take 2 parameters.

pythonjian commented 10 years ago

Thanks I removed the function and add a new query, it work now :) But when i refresh the web page (F5) or open the page by other browser,it become the test page agian. Can i save the new query page ?

torkelo commented 10 years ago

Yes, you the save icon in the menu to open the save dropdown. Here you can save to Elasticsearch or export to json file.