[英]Metrics from new job absent in Prometheus
I installed new node_exporter.我安装了新的 node_exporter。
Mertics aviable on Mertics 可用于
server01:9100/metrics server01:9100/指标
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在配置 prometheus.yml 中写入新作业和目标
- 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:
通过 API 检查可用性新作业和目标,返回:
{"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
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
,而是node_filesystem_device_error
。 node_exporter_metrics
is the job
label. node_exporter_metrics
是job
标签。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.