Created
August 22, 2013 16:52
-
-
Save bvenable/6309862 to your computer and use it in GitHub Desktop.
graylog2 config
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 => 5140 | |
type => syslog | |
} | |
udp { | |
port => 5140 | |
type => syslog | |
} | |
} | |
filter { | |
metrics { | |
type => "syslog" | |
meter => "events" | |
add_tag => "metric" | |
} | |
grok { | |
type => "syslog" | |
pattern => [ "<%{POSINT:syslog_pri}>%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} %{DATA:syslog_program}(?:\[%{POSINT:syslog_pid}\])?: %{GREEDYDATA:syslog_message}" ] | |
add_field => [ "received_at", "%{@timestamp}" ] | |
add_field => [ "received_from", "%{@source_host}" ] | |
} | |
syslog_pri { | |
type => "syslog" | |
} | |
date { | |
type => "syslog" | |
match => [ "syslog_timestamp", "MMM d HH:mm:ss", "MMM dd HH:mm:ss" ] | |
} | |
mutate { | |
type => "syslog" | |
exclude_tags => "_grokparsefailure" | |
replace => [ "@source_host", "%{syslog_hostname}" ] | |
replace => [ "@message", "%{syslog_message}" ] | |
} | |
mutate { | |
type => "syslog" | |
remove => [ "syslog_hostname", "syslog_message", "syslog_timestamp" ] | |
} | |
} | |
output { | |
stdout { | |
tags => "metric" | |
message => "rate: %{events.rate_1m}" | |
} | |
gelf { | |
facility => "%{syslog_facility}" | |
level => "%{syslog_severity}" | |
host => "127.0.0.1" | |
port => 12201 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment