Skip to content

Allow sprintf field reference for port property #42

Open
@bczifra

Description

@bczifra

The code expects the port property to be specified as a number. If you specify port => "%{[port]}" then it will throw the following error:

Here is the error message in the log:
[2021-11-11T16:08:05,089][ERROR][logstash.outputs.tcp ] Invalid setting for tcp output plugin:

output {
tcp {
# This setting must be a number
# Expected number, got "%{[port]}" (type %{[port]})
port => "%{[port]}"
...
}
}
[2021-11-11T16:08:05,094][ERROR][logstash.agent ] Failed to execute action

It would be useful to be able to specify this value based on the event properties in the manner shown above.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions