本文永久链接: https://www.xtplayer.cn/prometheus/Customize-the-configuration-parameters-for-Prometheus-health-checks/

进入 rancher ui,切换到 cluster | tools 界面,编辑 monitoring APP,然后编辑 yaml。搜索 name: prometheus-proxy,在name: prometheus-proxycontainers: | 之间插入如下的配置。健康检查参数根据需要进行调整。

configMaps: []
containers: |
- name: prometheus
livenessProbe:
httpGet:
path: /-/healthy
port: http-web
scheme: HTTP
failureThreshold: 10
initialDelaySeconds: 60
periodSeconds: 30
timeoutSeconds: 10
successThreshold: 1
readinessProbe:
httpGet:
path: /-/ready
port: http-web
scheme: HTTP
failureThreshold: 3
initialDelaySeconds: 30
periodSeconds: 10
timeoutSeconds: 10
successThreshold: 1
startupProbe:
httpGet:
path: /-/ready
port: http-web
scheme: HTTP
failureThreshold: 60
initialDelaySeconds: 60
periodSeconds: 30
successThreshold: 1
timeoutSeconds: 10
- name: prometheus-proxy