关于修改Prometheus指标告警阈值
方法一:
在rancher平台仪表盘里修改

修改告警规则的配置文件

修改阈值并保存

rules界面查看是否生效

方法二:
cd /xi/operator/operator-0.7/manifests/prometheus
vim custom-rules.yaml
修改阈值

更新prometheus配置
[root@k8s-master01 /xi/operator/operator-0.7/manifests/prometheus]$ kubectl apply -f custom-rules.yaml 
prometheusrule.monitoring.coreos.com/antute-rules configured
重启prometheus加载配置文件
[root@k8s-master01 /xi/operator/operator-0.7/manifests/prometheus]$ kubectl rollout restart sts prometheus-k8s -n monitoring
statefulset.apps/prometheus-k8s restarted
检查prometheus的pod状态
[root@k8s-master01 /xi/operator/operator-0.7/manifests/prometheus]$ kubectl -n monitoring get pod

检查阈值配置是否生效
访问prometheus WEB界面点击“Status”--->“Rules”,查看配置是否生效

                    
                
                
            
        
浙公网安备 33010602011771号