Skip to content

replace is adding two copies of string #61

Description

@SnazzyBootMan

fluentd:1.11.2
fluent-plugin-record-modifier:2.1.0

Config:

<filter foo-api.**>
  @type record_transformer
  <record>
    ecs_container_id "foo-api-#{Socket.gethostname}"
  </record>
</filter>

<filter foo-api.**>
  @type record_modifier
  <replace>
    key ecs_container_id
    expression /.*/
    replace foo-api-testing
  </replace>
</filter>

So I create a new field called "ecs_container_id" and set it to "foo-api-#{Socket.gethostname}" and this works.

As a test I then try to use the replace functionality (just to prove it works) to change that to "foo-api-testing". When doing this it writes two copies of the string in the new field so the value is:

foo-api-testingfoo-api-testing

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions