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 

5 REPLIES 5

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 ?

Featured Posts