Skip to content

[ECS/Fargate] Supress "No pod metric collected" when the CloudWatch agent running on ECS/Fargate #806

@aws-patrickc

Description

@aws-patrickc

Is your feature request related to a problem? Please describe.
Yes, when using CloudWatch agent with ECS containers the following log messages gets repeated logged:

2023-08-05T05:35:10Z W! No pod metric collected, metrics count is still 8 is containerd socket mounted? https://github.com/aws/amazon-cloudwatch-agent/issues/188

This appears to be a mechanism to determine if the container used is Kubernetes/EKS or not, which makes sense as CloudWatch agent can be used for both EKS and ECS. However, repeatedly logging this line when ECS is being used adds no value and does increase log group size and unwanted noise. I couldn't find a way to suppress this.

Describe the solution you'd like
Please can we have a flag/configuration value where we can suppress this type of message?

Describe alternatives you've considered
None

Additional context
See log files repeatedly logging the message every minute:

timestamp,message
1691213710444,"2023-08-05T05:35:10Z W! No pod metric collected, metrics count is still 8 is containerd socket mounted? https://github.com/aws/amazon-cloudwatch-agent/issues/188"
1691213770444,"2023-08-05T05:36:10Z W! No pod metric collected, metrics count is still 8 is containerd socket mounted? https://github.com/aws/amazon-cloudwatch-agent/issues/188"
1691213830444,"2023-08-05T05:37:10Z W! No pod metric collected, metrics count is still 8 is containerd socket mounted? https://github.com/aws/amazon-cloudwatch-agent/issues/188"
1691213890443,"2023-08-05T05:38:10Z W! No pod metric collected, metrics count is still 8 is containerd socket mounted? https://github.com/aws/amazon-cloudwatch-agent/issues/188"
1691213950444,"2023-08-05T05:39:10Z W! No pod metric collected, metrics count is still 8 is containerd socket mounted? https://github.com/aws/amazon-cloudwatch-agent/issues/188"
1691213951160,"W0805 05:39:11.160401       1 info.go:53] Couldn't collect info from any of the files in ""/rootfs/etc/machine-id,/var/lib/dbus/machine-id"""
1691214010443,"2023-08-05T05:40:10Z W! No pod metric collected, metrics count is still 8 is containerd socket mounted? https://github.com/aws/amazon-cloudwatch-agent/issues/188"
1691214070443,"2023-08-05T05:41:10Z W! No pod metric collected, metrics count is still 8 is containerd socket mounted? https://github.com/aws/amazon-cloudwatch-agent/issues/188"
1691214130445,"2023-08-05T05:42:10Z W! No pod metric collected, metrics count is still 8 is containerd socket mounted? https://github.com/aws/amazon-cloudwatch-agent/issues/188"
1691214190443,"2023-08-05T05:43:10Z W! No pod metric collected, metrics count is still 8 is containerd socket mounted? https://github.com/aws/amazon-cloudwatch-agent/issues/188"
1691214250443,"2023-08-05T05:44:10Z W! No pod metric collected, metrics count is still 8 is containerd socket mounted? https://github.com/aws/amazon-cloudwatch-agent/issues/188"
1691214251160,"W0805 05:44:11.160598       1 info.go:53] Couldn't collect info from any of the files in ""/rootfs/etc/machine-id,/var/lib/dbus/machine-id"""
1691214310444,"2023-08-05T05:45:10Z W! No pod metric collected, metrics count is still 8 is containerd socket mounted? https://github.com/aws/amazon-cloudwatch-agent/issues/188"
1691214370443,"2023-08-05T05:46:10Z W! No pod metric collected, metrics count is still 8 is containerd socket mounted? https://github.com/aws/amazon-cloudwatch-agent/issues/188"
1691214430444,"2023-08-05T05:47:10Z W! No pod metric collected, metrics count is still 8 is containerd socket mounted? https://github.com/aws/amazon-cloudwatch-agent/issues/188"
1691214490444,"2023-08-05T05:48:10Z W! No pod metric collected, metrics count is still 8 is containerd socket mounted? https://github.com/aws/amazon-cloudwatch-agent/issues/188"
1691214550443,"2023-08-05T05:49:10Z W! No pod metric collected, metrics count is still 8 is containerd socket mounted? https://github.com/aws/amazon-cloudwatch-agent/issues/188"
1691214551160,"W0805 05:49:11.160246       1 info.go:53] Couldn't collect info from any of the files in ""/rootfs/etc/machine-id,/var/lib/dbus/machine-id"""
1691214610444,"2023-08-05T05:50:10Z W! No pod metric collected, metrics count is still 8 is containerd socket mounted? https://github.com/aws/amazon-cloudwatch-agent/issues/188"
1691214670445,"2023-08-05T05:51:10Z W! No pod metric collected, metrics count is still 8 is containerd socket mounted? https://github.com/aws/amazon-cloudwatch-agent/issues/188"
1691214730443,"2023-08-05T05:52:10Z W! No pod metric collected, metrics count is still 8 is containerd socket mounted? https://github.com/aws/amazon-cloudwatch-agent/issues/188"
1691214790443,"2023-08-05T05:53:10Z W! No pod metric collected, metrics count is still 8 is containerd socket mounted? https://github.com/aws/amazon-cloudwatch-agent/issues/188"
1691214850444,"2023-08-05T05:54:10Z W! No pod metric collected, metrics count is still 8 is containerd socket mounted? https://github.com/aws/amazon-cloudwatch-agent/issues/188"
1691214851161,"W0805 05:54:11.161002       1 info.go:53] Couldn't collect info from any of the files in ""/rootfs/etc/machine-id,/var/lib/dbus/machine-id"""

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions