POST dashboard json

Asked by Todd Nine

Hey guys,
 I have a cloudformation setup that automatically spins up Graphite. I have a script that runs within my nodes that creates a valid JSON file for the graphite dashboard. If I manually download this file, and then post it via Dashboard -> Edit, I get the dashboard I want.

However, I want my nodes to be able to POST this json directly into graphite as they start, so I don't have to do this manually, I've tried the following, but the format is incorrect.

curl -i -d '[graphite dashboard json]' -X POST "http://[graphite host]/dashboard/save/Tomcats

in order to create the tomcats dashboard. Here is an example of my json

https://gist.github.com/tnine/2afe9e684208238e25a7

Is there any documentation on what is required in the request for the REST api so that I can code this up to happen via curl?

Thanks,
Todd

Question information

Language:
English Edit question
Status:
Answered
For:
Graphite Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Anatoliy Dobrosynets (anatolijd) said :
#1

Hi Todd,

Graphite /admin/ interface does not provide any REST API, it is a plain html form, therefore you have to send all the form fields in curl request (see curl -F ).

Also,
Graphite built-in dashboard is a bit abandoned now (imho), I really encourage you to take a look at http://grafana.org/ .

Can you help with this problem?

Provide an answer of your own, or ask Todd Nine for more information if necessary.

To post a message you must log in.