Last active
February 1, 2017 23:31
-
-
Save catherinetcai/ced3d14e2963202ad1453ace71c51a51 to your computer and use it in GitHub Desktop.
Slurping rsyslog 7.4.4
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 { | |
tcp { | |
port => 5514 | |
type => syslog | |
} | |
} | |
filter { | |
if [type] == "syslog" { | |
grok { | |
match => { "message" => "<%{POSINT:syslog_lvl}>%{SYSLOGTIMESTAMP:syslog_timestamp} %{DATA:hostname} (%{GREEDYDATA:program}:) %{GREEDYDATA:message_remainder}" } | |
add_tag => [ "%{program}" ] | |
} | |
mutate { | |
replace => { "message" => "%{message_remainder}" } | |
remove_field => [ "message_remainder", "@version", "syslog_timestamp" ] | |
} | |
} | |
} | |
output { | |
stdout { codec => rubydebug } | |
} |
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
{ | |
"hostname" => "collect-1: message repeated 33", | |
"@timestamp" => 2017-02-01T23:27:21.168Z, | |
"port" => 51601, | |
"host" => "127.0.0.1", | |
"syslog_lvl" => "13", | |
"program" => "times", | |
"message" => "[ COLLECT SIDE]", | |
"type" => "syslog", | |
"tags" => [ | |
[0] "times" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment