How via Prometheus API to request information on node_filesystem_avail and only in the specific instance?

Hello.

Recently began to develop a monitoring system Prometheus.
Learned how to make queries by name of the metric node_filesystem_avail

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


All good, BUT it returns a list of all instance with the mountpoint.

How to request information on node_filesystem_avail and only in the specific instance?

p.s. options to parse are not suitable, because you intend to use graphana.
June 10th 19 at 15:09
1 answer
June 10th 19 at 15:11
Solution
understand the wisdom of the Prometheus API
example of a correct query that returns metric values node_filesystem_avail on the mount point /data on the server 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.781 Z&end=2017-12-15T11:17:00.781 Z&step=15s

Find more questions by tags Monitoring