I have kube state metrics, prometheus and alertmanager deployed an VM. I have configured prometheus and alertmanager to get alerts , when number of restarts increases certain value in a certain amount of time. It is working fine. But, a lot of unnecessary data is coming as a part of the alerts. Basically, I do not want all the labels seen in prometheus to be a part of alert.
Currently what I am receving:
alertname = RestartsAlerts
container = kube-state-metrics
endpoint = http
exported_container = kube-scheduler
exported_namespace = kube-system
....
alertname = RestartsAlerts
container = kube-state-metrics
endpoint = http
exported_container = kube-scheduler
exported_namespace = kube-system
But, a lot of unnecessary data is coming as a part of the alerts. Basically, I do not want all the labels seen in prometheus to be a part of alert.
alert_relabel_configs:
- regex: 'exported_namespace|exported_container'
action: labeldrop