简体   繁体   中英

Metrics from new job absent in Prometheus

I installed new node_exporter.

Mertics aviable on

server01:9100/metrics

for example

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

wrote in config prometheus.yml new job and target

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

After restarted Prometheus. Checked avialability new job and target by API, returned:

{"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"}

tried to get values by new job

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

result

{"status":"success","data":{"resultType":"matrix","result":[]}}

How solve this problem?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM