Skip to content

labeldrop doesn't seem to drop all matching labels #94

Description

@leshik

I have the following simple relabel config:

[
  {
    "source_labels": ["__aws_cloudwatch_log_group"],
    "target_label": "cloudwatch_log_group",
    "action": "replace"
  },
  {
    "regex": "__aws_.*",
    "action": "labeldrop"
  }
]

Labels before applying the config:

__aws_cloudwatch_log_group: /aws/transfer/s-7a8a3980081f4479b
__aws_cloudwatch_owner: XXXXXXXXXXXX
__aws_kinesis_event_source_arn: arn:aws:kinesis:ap-southeast-2:XXXXXXXXXXXX:stream/cloudwatch.logs
__aws_log_type: kinesis

Labels after applying the config:

__aws_cloudwatch_log_group: /aws/transfer/s-7a8a3980081f4479b
__aws_cloudwatch_owner: XXXXXXXXXXXX
__aws_kinesis_event_source_arn: arn:aws:kinesis:ap-southeast-2:XXXXXXXXXXXX:stream/cloudwatch.logs
cloudwatch_log_group: /aws/transfer/s-7a8a3980081f4479b

So the label was replaced correctly, but then only one out of 4 matching labels was dropped.

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions