Prometheus Api to json to use in react.js

519 views
Skip to first unread message

Geet

unread,
Aug 12, 2022, 4:36:23 AM8/12/22
to Prometheus Users
Hi ,

What is the best way to collect data from Prometheus metrics which is in dev environment and convert the metrics to json and to use in react.js for making bar charts?

Stuart Clark

unread,
Aug 12, 2022, 5:11:09 AM8/12/22
to Geet, Prometheus Users
Take a look at the HTTP query API which returns a JSON response for a
query you send:

https://prometheus.io/docs/prometheus/latest/querying/api/

--
Stuart Clark

Reply all
Reply to author
Forward
0 new messages