kasdev
February 21, 2024, 8:07am
1
Hello.
I share you a visual and i’ve a question.
This is how Dynatrace gives container events within the container group, such as process restart, process crashed. Is there a chance to see these in a single dashboard for all applications? I looked at the metrics a bit, but I could only find the number of process restarts.
Hi,
I think that is possible but only if you are using Grail + DQL. Are you in a Grail-enabled tenant?
Best regards
You can use Platform dashboards to get this info.
fetch events
| sort timestamp desc
| filter dt.entity.cloud_application_namespace == "CLOUD_APPLICATION_NAMESPACE-CF142217B59E0921"
| filter event.kind == "DAVIS_EVENT"
| fields timestamp, dt.entity.cloud_application_instance.name, dt.kubernetes.event.involved_object.kind, dt.kubernetes.event.involved_object.name, dt.kubernetes.event.message, dt.kubernetes.event.reason
| limit 100
kasdev
February 21, 2024, 8:54am
4
how can i use platform dashboard? i could not find something like that
kasdev
February 21, 2024, 9:23am
6
no its managed but i’ve find now what you said.
i was in classic dynatrace ui before but now im in latest dynatrace and i can see your fetch events screen. but i dont know how to customize these:
fetch events
| sort timestamp desc
| filter dt.entity.cloud_application_namespace == "CLOUD_APPLICATION_NAMESPACE-CF142217B59E0921"
| filter event.kind == "DAVIS_EVENT"
| fields timestamp, dt.entity.cloud_application_instance.name, dt.kubernetes.event.involved_object.kind, dt.kubernetes.event.involved_object.name, dt.kubernetes.event.message, dt.kubernetes.event.reason
| limit 100
i guess i firstly need to change dt.entity.cloud_application_namespace
and dt.entity.cloud_application_instance.name, dt.kubernetes.event.involved_object.kind etc..
but currently i dont know if its kubernetes or openshift. i guess its openshift.
(by the way im an intern at my company so im sorry if i ask you too much:) )
kasdev
February 21, 2024, 9:33am
7
i dont know but i can try what you suggest
Ah!!! now it’s time for you to play with DQL
K8s , EKS, AKS or Openshift doesn’t matter in this context.
kasdev
February 21, 2024, 2:22pm
9
hello again. i read the document but i couldn’t manage to find what i need.
do you know how to query events for a specific container group name?
fetch logs query works but fetch events query does not give me anything.
The best place to ask for help with DQL is the DQL forum, but let’s try something like this:
fetch events
| sort timestamp desc
| filter startsWith(dt.kubernetes.event.involved_object.name, "cartservice-")
| filter event.kind == "DAVIS_EVENT"
| fields timestamp, dt.entity.cloud_application_instance.name, dt.kubernetes.event.involved_object.kind, dt.kubernetes.event.involved_object.name, dt.kubernetes.event.message, dt.kubernetes.event.reason
| limit 100
Where I filter the object with a name starting with cartservice-
mizso74
February 21, 2024, 10:48pm
11
Hi @kasdev ,
Your other post: Creating dashboard for container events from a container group - Dynatrace Community
There is another option too if it is possible to use classic dashbboard with data explorer. If you have API integration to your k8s cluster you can use the builtin:kubernetes.events with many dimensions
You can create fancy dashboard tiles, like this:
I hope it helps.
Best regards,
Mizső
The only reason to use DQL is to have the event message.
Otherwise, your approach is the best one.
kasdev
February 23, 2024, 11:14am
13
thanks for your help but unfortunately event count does not provide me what i need.
As seen in my visual, i need container events like process restart, process crashed etc..