|NO.Z.00341|——————————|CloudNative|——|KuberNetes&运维.V58|——|Prometheus.v03|自动发现.v03|查看监控数据|

一、查看创建的job已经添加完成
### --- 查看discovery是否生成

~~~     ——>http://prom.test.com/——>status
~~~     ——>Service discovery:auto_discovery已经创建完成,但是没有匹配到任何的targets
二、匹配一个域名让其监控
### --- 匹配一个域名让其监控

~~~     ——>http://krm.test.com——>Ingress——>Namespace:kube-system
~~~     ——>Host:krm.test.com——>Option:编辑——>annotations:
~~~     添加:annotations:Key:prometheus.io/http_probe Valuetrue——>update——>END
~~~     # 若是域名定义了prometheus_io_http_probe这个annotations,
~~~     relabel_configs就可以匹配到,
~~~     若是为true的话,它就会把这个target自动的给监控上,

[root@k8s-master01 discovery]# cat prometheus-additional.yaml
        - source_labels: [__meta_kubernetes_ingress_annotation_prometheus_io_http_probe]
        action: keep
        regex: true
三、检测到targets值,并自动监控上:服务发现检测成功
四、查看grafana是否采集到数据
### --- 查看grafana是否采集到数据

~~~     http://krm.test.com/监控报红:是因为黑盒解析不了域名
~~~     因为这个域名是我们配置了hosts解析

 
 
 
 
 
 
 
 
 

Walter Savage Landor:strove with none,for none was worth my strife.Nature I loved and, next to Nature, Art:I warm'd both hands before the fire of life.It sinks, and I am ready to depart
                                                                                                                                                   ——W.S.Landor

 

 

posted on   yanqi_vip  阅读(20)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· Docker 太简单,K8s 太复杂?w7panel 让容器管理更轻松!
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示