前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >prometheus (四) 黑盒监控

prometheus (四) 黑盒监控

作者头像
Amadeus
发布2023-05-02 16:56:27
1900
发布2023-05-02 16:56:27
举报
文章被收录于专栏:linux技术linux技术

Probe CRD 的 API 文档: https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.Probe

在 k8s 集群创建 Probe

代码语言:javascript
复制
apiVersion: monitoring.coreos.com/v1
kind: Probe
metadata:
  name: demo-probe-node-exporter
  namespace: monitoring
spec:
  jobName: demo-probe-node-exporter
  interval: 10s
  prober:
    url: localhost
    path: /metrics
  metricRelabelings:
  - sourceLabels: [__address__]
    targetLabel: target
  targets:
    staticConfig:
      static:
      - 1.1.1.4:9100
      relabelingConfigs:
      - sourceLabels: [__param_target]
        targetLabel: instance
      - sourceLabels: [__param_target]
        targetLabel: __address__

应用完上述配置文件后, 查看 prometheus

image-20230426170408001
image-20230426170408001

简单查询一下 count(node_cpu_seconds_total{instance="1.1.1.4:9100",mode='system'})

image-20230426171733278
image-20230426171733278
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2023-04-27,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档