cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Show Container name on Kubernetes container restart alerts/problem cards

gurugogi
Guide

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 

6 REPLIES 6

gurugogi
Guide

anyone tried ?

Mizső
DynaMight Guru
DynaMight Guru

Hi @gurugogi,

Have you tride this metric experession in the metric event?

 

Mizs_1-1727953158201.png

Then you can use the container dimension in the metric event:

Mizs_2-1727953254102.png

I hope it helps.

Best regards,

Mizső

Dynatrace Community RockStar 2024, Certified Dynatrace Professional

@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 

gurugogi
Guide

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.

Only option is to create "Metric event"/"Custom alert" for each K8S cluster and MZ filter ?

Hello @gurugogi 

  1. let's agree that to get notified > problem alerting profile should be Created and hence > Management zone rules should be configured and customized to include all related entities.

  2. The point here is to ensure the K8s configured management zone contains all K8s related entities and then you can easily create metrics and receive alerts upon the specified conditions.

For the K8s related anomaly detections, feel free to customize it as per the K8s admin inputs

2024-10-08_16h48_35.png

2024-10-08_16h50_50.png2024-10-08_16h51_34.png2024-10-08_16h51_47.png

2024-10-08_16h53_45.png2024-10-08_16h54_02.png

BR,

Peter

Featured Posts