Skip to content

Instantly share code, notes, and snippets.

@khouse
Created July 10, 2014 16:56
Show Gist options
  • Save khouse/40e3ac53bff1cc623f0e to your computer and use it in GitHub Desktop.
Save khouse/40e3ac53bff1cc623f0e to your computer and use it in GitHub Desktop.
syslog input
filter {
if [type] == "syslog" {
grok {
#match => { "message" => "%{URIHOST}:%{BASE16FLOAT}%{ISO8601_TIMEZONE} %{TOKEN:token} %{SYSLOGHOST:syslog_hostname} %{DATA:syslog_program}: %{GREEDYDATA:syslog_message}" }
match => { "message" => "%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} %{DATA:syslog_program}: %{GREEDYDATA:syslog_message}" }
add_field => [ "received_at", "%{@timestamp}" ]
add_field => [ "received_from", "%{host}" ]
}
syslog_pri { }
date {
match => [ "syslog_timestamp", "MMM d HH:mm:ss", "MMM dd HH:mm:ss" ]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment