Logstash UDP output

Hello,

Is it possible to send only the message by UDP (output). If i remove the host field for example, i get %{host} instead :disappointed:

Here is my conf :

input {
  udp {
    port => 3000
    codec => plain
  }
}
filter {
   mutate {
     remove_field => [ "host", "@version" ]
   }
}
output {
   stdout {codec => json}
   udp {
     host => localhost
     port => 3001
     codec => "plain"
   }
}

If I send a message :
echo -n “Hello” | nc -4u -w1 localhost 3000

I get from the server :

2016-03-02T09:27:16.878Z %{host} “Hello”

I just want the message :

"Hello"

Thank you for your help,

Jeremy

This should do it:

udp {
  host => "localhost"
  port => 3001
  codec => plain {
    format => "%{message}"
  }
}
2 Likes

works fine :slightly_smiling:

thank you Magnus