Created
December 23, 2014 05:54
-
-
Save VAdamec/f0053cc78454ca07a4be to your computer and use it in GitHub Desktop.
Nagios simple log parsing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input { | |
zeromq { | |
type => 'zmq' | |
topology => 'pushpull' | |
address => 'tcp://*:5556' | |
mode => 'server' | |
} | |
} | |
output { | |
elasticsearch { | |
cluster => "ELA003" | |
index => "nagios-logstash-%{+YYYY.MM.dd}" | |
tags => ["nagios"] | |
} | |
stdout { | |
debug => true | |
debug_format => "json" | |
tags => ["nagios"] | |
} | |
} | |
filter { | |
grok { | |
tags => ["nagios"] | |
match => [ "@message", "\[%{NUMBER:timestamp}\]\s%{DATA:type}\:\s%{DATA:host}\;%{DATA:check}\;%{DATA:level}\;%{DATA:alert}\;%{DATA:repeat}\;%{GREEDYDATA:comment}" ] | |
} | |
mutate { | |
remove => ["timestamp"] | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment