Skip to content

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

Description

@tushar-012

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]

ignoreAnnotation = "aws.amazon.com/cloudwatch-agent-ignore"

[2]

// Ignore if we're told to ignore
if strings.EqualFold(entry.pod.ObjectMeta.Annotations[ignoreAnnotation], "true") {
return false

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions