...
Code Block |
---|
curl -XPOST -u <user>:<password> 'http://influxdb.url:<port>/query?db=mz' --data-urlencode "q=SHOW MEASUREMENTS" |
Use the following command to show databases:
Code Block |
---|
curl -XPOST -u <user>:<password> 'http://influxdb.url:<port>/query?' --data-urlencode "q=SHOW DATABASES" |
Use the following command to query a measurement for the latest 10 rows:
...
Code Block |
---|
curl -XPOST -H "Content-Type: application/json" -u <user>:<password> http://grafana.url:<port>/api/datasources --data-binary @<name_of_datasource>.json |
Use the following REST API to add a dashboard from a file:
Code Block |
---|
curl -XPOST -u <user>:<password> http://grafana_url:<port>/api/dashboards/db --data-binary @<dashboard_name>.json -H "Content-Type: application/json" |
...
Use the following REST API to export a dashboard to file:
...
For further information on REST API for Grafana, see http://docs.grafana.org/http_api/.
Scroll ignore | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||
Scroll pagebreak |
---|