UDP Input - Get host - how?

Hey,

How can I get the sender IP in UDP Input? I would like create an if expression for set type. I tried this, but it is not working:

    input {
       udp {
          port => 1514

          if [host] == "1.1.1.1" {
             type => "example"
          }
       }
    }

Thanks!

You cannot use a conditional inside a input like that. You would have to do it in a filter section using mutate+add_field.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.