Reading data from prometheus into Java application

Viewed 171

Anyone has tried reading the data from prometheus into a java application.

I am looking to process the metrics data in prometheus and derive some insights out of it.

Unable to find any driver or connector to connect to prometheus, except the HTTP API which prometheus provides.

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

1 Answers

So far I only used Grafana to read and render data from Prometheus.

With that I have not tested this client, but it seems there are more than none out there.

Otherwise, it should be quite straightforward to run HTTP GET requests using HttpClient, then parsing the result using Genson.

Related