Hi,

0
<https://stackoverflow.com/posts/64674553/timeline>

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*

Alert configuration: 
*- name: Pod-Restarts    *
*  rules:      - alert: RestartsAlerts        *
*  expr: max_over_time(kube_pod_container_status_restarts_total[3m]) - 
min_over_time(kube_pod_container_status_restarts_total[3m]) > 1        *
*   labels:         *
*       severity: critical       *
*   annotations:          *
*       summary: "More than 1 restart in pod {{ $labels.exported_pod 
}}"          *
*       description: "{{ $labels.exported_container }} container has 
restarted {{ $value }} times.\n Instance: {{ $labels.instance }}"*
 
In the above alert, I don't want namespace, container, etc to be a part of 
the alert. I only want the summary and description. 

Please help with the same.

Thank you,
Guna




-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/d64822c3-fadf-4466-a5ea-e8e24cf2eb87n%40googlegroups.com.

Reply via email to