Add labels for alerts generated by Project Monitors.
Article Number: 000021989
Environment
Rancher v2.10.x
Procedure
To label alerts for Project Monitors, you must configure the Prometheus Federator Helm chart's values section. This is done by adding additionalRuleLabels under defaultRules within helmProjectOperator. You can perform this modification during a new chart installation or by updating a deployed one. This allows you to tag alerts with information like cluster_id for easy identification and routing to a remote_write endpoint:
helmProjectOperator:
valuesOverride:
defaultRules:
additionalRuleLabels:
cluster_id: your-cluster-id
another: label <== An example to how multiple labels can be added.
Verification:
Once the values are updated and the chart is upgraded, you would be able to see the cluster_id for the alerts once you navigate to the Alertmanager Window.