Logstash or condition in if statement

Hi guys,

i want to check multiple condition in if statement.

my filter like that but it is not working. it pass everything :slight_smile: it worked when i was only one condition.

1 ) doesnt work ->
if [logid] == "%LINK-3-UPDOWN" or "%ETHPORT-5-IF_DOWN_LINK_FAILURE" or "%ETH_PORT_CHANNEL-5-PORT_DOWN"

  1. workb->
    if [logid] == "%LINK-3-UPDOWN"

sincerely

You need this:

if [logid] == "%LINK-3-UPDOWN" or [logid] == "%ETHPORT-5-IF_DOWN_LINK_FAILURE" or [logid] == "%ETH_PORT_CHANNEL-5-PORT_DOWN"
6 Likes

thank you magnus. that is definitly works.

1 Like

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