Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow sprintf field reference for port property #42

Open
bczifra opened this issue Nov 12, 2021 · 0 comments
Open

Allow sprintf field reference for port property #42

bczifra opened this issue Nov 12, 2021 · 0 comments

Comments

@bczifra
Copy link

bczifra commented Nov 12, 2021

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.

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

No branches or pull requests

1 participant