Skip to content

Commit

Permalink
Merge pull request #28 from Crited/feature/httpserverconnection_27
Browse files Browse the repository at this point in the history
add rules for httpserverconnection logs
  • Loading branch information
widhalmt authored May 24, 2019
2 parents 97f2c30 + 797baee commit 48d0b86
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions filter-50-httpserverconnection.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
filter {
if [icinga][facility] == "HttpServerConnection" {
if [message] =~ /^HTTP client disconnected .+from/ {
grok {
match => ["message","HTTP client disconnected \(from \[%{IP:[icinga][httpclientip]}\]:%{NUMBER:[icinga][httpclientport]}\)"]
id => "icinga_httpclientdisconnected"
add_tag => "icinga_httpclientdisconnected"
tag_on_failure => ["_grokparsefailure","icinga_httpclientdisconnected_failed"]
add_field => {
"[icinga][eventtype]" => "http_client_disconnected"
}
}
} else if [message] =~ /^Request: GET .+, user: .+, agent: .+/ {
grok {
match => ["message","Request: %{WORD:[icinga][tbd]} %{DATA:[icinga][path]} \(from \[%{IP:[icinga][httpclientip]}\]:%{NUMBER:[icinga][httpclientport]}\), user: %{USERNAME:[icinga][user]}, agent: %{DATA:[icinga][agent]} \(%{DATA:[icinga][agent]}\) %{DATA:[icinga][agent]}\)"]
id => "icinga_requestget"
add_tag => "icinga_requestget"
tag_on_failure => ["_grokparsefailure","icinga_requestget_failed"]
add_field => {
"[icinga][eventtype]" => "request_get"
}
}
}
}
}

0 comments on commit 48d0b86

Please sign in to comment.