N
N
Nikolay Baranenko2017-12-14 18:05:34
Monitoring
Nikolay Baranenko, 2017-12-14 18:05:34

Why does prometheus return nothing when requesting metrics from node_exporter?

Hello.
Set node_exporter, port 9000
metrics on http available
server01:9100/metrics

...
node_filesystem_device_error{device="/dev/sda1",fstype="ext4",mountpoint="/boot"} 0
node_filesystem_device_error{device="/dev/sdb1",fstype="xfs",mountpoint="/data"} 0

prescribed in
- job_name: node_exporter_metrics
    metrics_path: /metrics
    static_configs:
      - targets: ['server01:9100']

restarted prometheus
API request finds
server01:9090/api/v1/targets
new target
{"discoveredLabels":{"__address__":"server01:9100","__metrics_path__":"/metrics","__scheme__":"http","job":"node_exporter_metrics"},"labels":{"instance":"server01:9100","job":"node_exporter_metrics"},"scrapeUrl":"http://server01:9100/metrics","lastError":"","lastScrape":"2017-12-14T17:32:02.835779115+03:00","health":"up"}

trying to find raw data
http://server01:9090/api/v1/query_range?query=node_exporter_metrics&start=1513255115&end=1513258715&step=60

and nothing in return
{"status":"success","data":{"resultType":"matrix","result":[]}}

Why is there no data on the new Job?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
VElmogA, 2019-05-08
@VElmogA

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

The name of the metric is not node_exporter_metrics, it's node_filesystem_device_error. node_exporter_metrics is the job label.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question