If _grokparsefailure break condition


(Santosh Hulkund) #1

is there any way to break if conditions ?

filter {
     grok {
           patterns_dir => "/etc/logstash/file/patterns"
           match => { "message" => "%{COMMON_HEADER}" }
          }   
   if "_grokparsefailure" in [tags] {
          ... break and go to output {}
   } else {
          add_tag => [ "parsed" ]
          ... continue if statement ...
          if {
             if {
              }
          }
          ... go to output {}
}

(Tag V) #2
input {....} 
filter {
grok {
  // .........
}
if [tags] !~ "_grokparsefailure" {
           // do required stuff
}
}
output {....}

This is good enough i guess. more over i never came across break statements in logstash.


(system) #3

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