02 Oct 2024 09:14 PM - edited 04 Oct 2024 11:31 PM
We recently added the Containers app to our Dynatrace SaaS environment.
So far, we can see all of our ECS containers as entities in the app, as expected. I like it.
However, when we attempt to "Go to logs", the query it uses (shown below with IDs redacted) does not return any log records.
In order to return any logs, I have to use our custom log attribute of ecs_cluster or container_name.
When reviewing the container log records, all of the dt.entity.container_group and dt.entity.container_group_instance values are null.
Any thoughts as to why?
Thank you.
fetch logs
| filter (in(dt.entity.container_group, classicEntitySelector("type(CONTAINER_GROUP),entityId(CONTAINER_GROUP-REDACTED)")) or in(dt.entity.container_group_instance, classicEntitySelector("type(CONTAINER_GROUP_INSTANCE),fromRelationships.isInstanceOf(type(CONTAINER_GROUP),entityId(CONTAINER_GROUP-REDACTED))")) or in(dt.entity.process_group_instance, classicEntitySelector("type(PROCESS_GROUP_INSTANCE),fromRelationships.isPgiOfCgi(type(CONTAINER_GROUP_INSTANCE),fromRelationships.isInstanceOf(type(CONTAINER_GROUP),entityId(CONTAINER_GROUP-REDACTED)))")))
| sort timestamp desc
02 Oct 2024 09:56 PM
Hi @ASE
It's good to check if the log sources are configured or not
If you need to add custom log sources
On the environment level you can enable the below options as per monitoring requirements
KR,
Peter.
03 Oct 2024 12:14 AM - edited 04 Oct 2024 11:36 PM
Thank you for your informative and detailed replies, @Peter_Youssef.
I noticed some of these examples are related to Kubernetes.
What if we are using ECS/Fargate containers? Do the same verification steps apply?
As for the individual container logs themselves, they are visible in Dynatrace.
Regarding our logs, we are using CloudWatch Log Groups that are being forwarded into Dynatrace.
Could this be what's causing our issue?
We're not letting OneAgent auto-detect log sources, therefore, some of the dimensions like dt.entity.container_group and dt.entity.container_group_instance are not being populated.
I also just noticed that our logs are missing some of the Docker Metadata:
I'm trying to determine why none of these fields are visible and/or populated when I click on one of our container's log records.
How are these entity.container fields usually populated?