0.数据抓取的生命周期

prometheus服务发现 + Prometheus 查询说明 + 正则模糊查询

1.通过文件发现

- job_name: node

  file_sd_configs:

  - targets/nodes/*.json

  reflesh_interval: 5m

 

prometheus服务发现 + Prometheus 查询说明 + 正则模糊查询

2.添加标签

prometheus服务发现 + Prometheus 查询说明 + 正则模糊查询

cat ./node/node.json
[{"targets":["10.0.0.111:9100"], "labels":{"instance":"node_111"}}, {"targets":["10.0.0.134:9100"], "labels":{"datacenter":"node_134"}} ]

 3.正则模糊查询

up{myjob=~"node119.*"}

rate(node_network_receive_bytes_total{myjob=~"node119.*",device="eth0"}[1m])

参考:https://www.cnblogs.com/zhoujinyi/p/11951779.html   Prometheus学习系列(六)之Prometheus 查询说明

相关文章:

  • 2022-12-23
  • 2021-11-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-25
  • 2021-08-15
猜你喜欢
  • 2021-11-20
  • 2022-12-23
  • 2022-01-25
  • 2021-09-27
  • 2021-07-06
  • 2021-10-01
  • 2021-12-12
相关资源
相似解决方案