Compare multiple types in if in logstash

What is the proper syntax of comparing multiple types in logstash ?

like,

if[type] == grafana OR netdata {  # is this correct ?
 }
else if[type] == {
}
else {
}

Either

if [type] == "grafana" OR [type] == "netdata" { 

or

if [type] in ["grafana", "netdata"] { 

See https://www.elastic.co/guide/en/logstash/current/event-dependent-configuration.html.

1 Like

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