Hello Community,
I'm in trouble with my logstash pipeline configuration.
I'm trying to use syslog output plugin so that I can dynamically change the destination syslog server port. I'm trying do tcp/udp connection to different syslog server based on the source of event.
Do this I'm trying to assign syslog output plugin port from @metadata field, initialized earlier in the logstash pipeline per event source type (see below error).
I'm been trying to use
- convert to integer mutate filter
- using event field instead of @metadata field
When I'm assigning port variable from environment variable ${syslogport} it does work, but problem is that I cannot dynamically change the parameter value in the pipeline
I can use other @metadata field without problems (when the type is string)
Problem I'm facing is that plugin doesn't accept parameter because it's not number type.
[ERROR] 2023-01-10 22:59:48.959 [Converge PipelineAction::Create] syslog - Invalid setting for syslog output plugin:
output {
syslog {
# This setting must be a number
# Expected number, got "%[@metadata][syslogport]" (type %[@metadata][syslogport])
port => "%[@metadata][syslogport]"
...
}
}
Thanks for the support