N
N
Nikolay Baranenko2017-12-14 20:29:01
Monitoring
Nikolay Baranenko, 2017-12-14 20:29:01

How to request information on node_filesystem_avail through the Prometheus API and only on a specific instance?

Hello.
Recently, I started to master the Prometheus monitoring system.
Learned how to make queries by metric name node_filesystem_avail

http://server01:9090/api/v1/query_range?query=node_filesystem_avail&start=1513255115&end=1513258715&step=60

All is well, BUT it returns a list of all instances with mountpoint.
How to correctly request information on node_filesystem_avail and only on a specific instance?
ps parsing options are not suitable, because supposed to be used in graphana.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolay Baranenko, 2017-12-15
@drno-reg

figured out the wisdom of the Prometheus API
an example of a correct request that returns the values ​​of the node_filesystem_avail metric at the /data mount point on server01

http://server01:9090/api/v1/query_range?query={__name__=%22node_filesystem_avail%22,instance=%22server01:9100%22,mountpoint=%22/data%22}&start=2017-12-15T11:10:30.781Z&end=2017-12-15T11:17:00.781Z&step=15s

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question