18 Sep 2024 07:57 AM - last edited on 25 Sep 2024 08:26 AM by Michal_Gebacki
Hi All,
I have enabled alerting for container restart at anomaly detection-> Workload, it is creating alerts/Problem card when any container gets restarted, it is printing workload name in alerts but I want the particular container name to be printed in alerts (container name which got restarted.).
I tried with custom alerts(metric events), auto-tags etc looks like its not working, please guide if anyone has implemented this by modifying message body in mail alerts/slack alerts etc.
Thanks,
Guru Gogi
03 Oct 2024 12:01 PM
Hi @gurugogi,
Have you tride this metric experession in the metric event?
Then you can use the container dimension in the metric event:
I hope it helps.
Best regards,
Mizső
03 Oct 2024 12:34 PM
@Mizső thanks for reply.
I tried below expression and its triggering alerts for container restarts.
builtin:kubernetes.container.restarts
:splitBy("k8s.container.name","k8s.pod.name","k8s.cluster.name","k8s.namespace.name")
:count:sort(value(avg,descending))
I have not sleeted any MZ for this metric event so it is creating Problems in default alerting profile but I want the Problems to be grouped under specific alerting profiles tagged to specific
03 Oct 2024 12:36 PM
I want to use this single "Metric event" for all k8s clusters alerting, particularly we use slack notifications, so I want some particular container restart should be grouped under that particular alerting profile.
03 Oct 2024 12:45 PM
Only option is to create "Metric event"/"Custom alert" for each K8S cluster and MZ filter ?
08 Oct 2024 01:55 PM
Hello @gurugogi
For the K8s related anomaly detections, feel free to customize it as per the K8s admin inputs
BR,
Peter