Skip to content

Commit

Permalink
start rules for TlsStream logs
Browse files Browse the repository at this point in the history
helps with #13
  • Loading branch information
widhalmt committed May 3, 2019
1 parent bfb4a4b commit d062559
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion filter-50-pluginchecktask.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ filter {
add_tag => "icinga_checkcommandforobject"
tag_on_failure => ["_grokparsefailure","icinga_checkcommandforobject_failed"]
add_field => {
"[icinga][eventtype]" => "icinga_checkcommandforobject"
"[icinga][eventtype]" => "checkcommandforobject"
}
}
}
Expand Down
24 changes: 24 additions & 0 deletions filter-50-tlsstream.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
filter {
if [icinga][facility] == "TlsStream" {
if [message] =~ /^OpenSSL error:/ {
grok {
match => ["message","OpenSSL error: error:%{DATA:[icinga][sslerrorcode]}:%{GREEDYDATA:[icinga][sslerrordetails]}"]
id => "icinga_opensslerror"
add_tag => "icinga_opensslerror"
tag_on_failure => ["_grokparsefailure","icinga_opensslerror_failed"]
add_field => {
"[icinga][eventtype]" => "opensslerror"
}
}
} else if [message] == "TLS stream was disconnected." {
mutate {
id => "icinga_tlsstreamdisconnected"
add_tag => "icinga_tlsstreamdisconnected"
add_field => {
"[icinga][eventtype]" => "tlsstreamdisconnected"
}
}
}
}
}

0 comments on commit d062559

Please sign in to comment.