aws / amazon-cloudwatch-agent

CloudWatch Agent enables you to collect and export host-level metrics and logs on instances running Linux or Windows server.
MIT License
448 stars 205 forks source link

Disable collecting metrics/logs with annotation based on the cloudwatch agent. #1389

Open tushar-012 opened 1 month ago

tushar-012 commented 1 month ago

Is your feature request related to a problem? Please describe.

If a pod has the annotation aws.amazon.com/cloudwatch-agent-ignore: true it should be ignored by the amazon-cloudwatch-agent and logs/metrics should not be pushed to cloudwatch for that pod.

[1] https://github.com/aws/amazon-cloudwatch-agent/blob/dd1be96164c2cd6226a33c8cf7ce10a7f29547cf/plugins/processors/k8sdecorator/stores/podstore.go#L31

[2] https://github.com/aws/amazon-cloudwatch-agent/blob/dd1be96164c2cd6226a33c8cf7ce10a7f29547cf/plugins/processors/k8sdecorator/stores/podstore.go#L144-L146

RDarrylR commented 2 days ago

Any update on this? I had a call with AWS SA's about this a while back and they mentioned it was being looked at.