Is there any way I can parse the output that has been scraped from /metrics endpoint?

1/8/2019

When we scrape the etcd exposing end point (i. e. "/metrics"), we get a flat text. Is there any way we can structure the whole data to work on it instead of working on string comparison on the required metric?

Note: I don't want to use prometheus for monitoring. Instead I want to create my own framework to monitor etcd.

-- Sai Sushanth
etcd
kubernetes
metrics
monitoring

1 Answer

1/8/2019

https://github.com/prometheus/prom2json is probably what you are looking for.

-- coderanger
Source: StackOverflow