Eyal Ch
Eyal Ch

Reputation: 10056

how to get values from a graph in a dashboard in grafana V 2.0

i have a graph on a 'grafana' dashboard v2.0.

i want to get a value from this graph using an HTTP get (from python)

i have tried API Documentation but it is very poor. nothing is there for getting a value from a graph

i can find at the documentation only how to get a dashboard (GET /api/dashboards/db/:slug) with a token provided.

how can i get graph values?

(like if my metric is something like queue.prod.high.total_queues)

Thanks

Upvotes: 5

Views: 4398

Answers (1)

dukebody
dukebody

Reputation: 7185

You don't get metric values querying Grafana but Graphite. In python you can use the requests library and the Graphite URL API and the format parameter.

For example:

import requests
response = requests.get('http://your.graphite.host.com/render?target=queue.prod.high.total_queues&format=json')
data = response.json()

Upvotes: 2

Related Questions