I'm attempting to convert netflow data from the netflow codec into syslog data using the syslog output plugin.
The issue i'm having is that no matter what I set the syslog plugin "message" to, it only ever outputs the default of "%{message}". I have tried changing it to anything and everything and the setting in the config seems to have absolutely no affect on the output.
Here's my config:
input {
udp {
port => 2055
codec => netflow
}
}
output {
syslog{
host => "127.0.0.1"
port => 514
protocol => "tcp"
facility => "local0"
severity => "informational"
appname => "netflow"
sourcehost => "host"
message => "%{netflow}"
}
}
Here is the stdout from the input:
{
"netflow" => {
"flow_seq_num" => 3,
"ipv4_dst_addr" => "77.12.190.94",
"engine_type" => 1,
"dst_as" => 13887,
"last_switched" => "2019-12-10T23:12:03.969Z",
"in_bytes" => 921,
"l4_src_port" => 9010,
"src_as" => 60550,
"dst_mask" => 26,
"src_tos" => 0,
"version" => 5,
"ipv4_src_addr" => "10.154.20.12",
"sampling_interval" => 0,
"output_snmp" => 0,
"first_switched" => "2019-12-10T23:12:03.540Z",
"protocol" => 6,
"tcp_flags" => 0,
"sampling_algorithm" => 0,
"ipv4_next_hop" => "150.20.145.1",
"engine_id" => 0,
"flow_records" => 8,
"input_snmp" => 0,
"in_pkts" => 496,
"l4_dst_port" => 3306,
"src_mask" => 0
},
"@timestamp" => 2019-12-10T23:12:03.181Z,
"host" => "172.17.0.2",
"@version" => "1"
}
Here's the output, note that no matter what i put in the config, the message output is always "%{message}". What am i doing wrong?
Dec 10 23:03:07 host netflow[-]: 2019-12-10T23:03:07.833Z 172.17.0.2 %{message}