To label alerts for Project Monitors, you must configure the Prometheus Federator Helm chart'svaluessection. This is done by addingadditionalRuleLabelsunderdefaultRuleswithinhelmProjectOperator. You can perform this modification during a new chart installation or by updating a deployed one. This allows you to tag alerts with information likecluster_idfor easy identification and routing to aremote_writeendpoint:
要为项目监控器标记警报,您必须配置普罗米修斯联邦者舵手图表的值值部分。这是通过在helmProjectOperator的defaultRules下添加additionalRuleLabels来实现的。你可以在新安装图表时进行修改,或者通过更新已部署的图表来实现。这允许你用cluster_id等信息标记警报,便于识别并路由到remote_write端点:
<span style="color:#000000"><span style="background-color:#ffffff"><span style="background-color:#efefef"><code>helmProjectOperator: valuesOverride: defaultRules: additionalRuleLabels: cluster_id: your-cluster-id another: label <== An example to how multiple labels can be added. </code></span></span></span>
Verification: 验证:
Once the values are updated and the chart is upgraded, you would be able to see thecluster_idfor the alerts once you navigate to theAlertmanagerWindow.
一旦数值更新并图表升级,你就能在进入AlertManager窗口时看到警报的 cluster_id。
Rancher v2.10.x 牧场主 v2.10.x
访问Rancher-K8S解决方案博主,企业合作伙伴 :
https://blog.csdn.net/lidw2009