Skip to content

Instantly share code, notes, and snippets.

@sametsazak
Last active February 23, 2018 11:56
Show Gist options
  • Save sametsazak/a5d4e94746931bb2d1cd8caf20649852 to your computer and use it in GitHub Desktop.
Save sametsazak/a5d4e94746931bb2d1cd8caf20649852 to your computer and use it in GitHub Desktop.
@@input@@
filter {
if [type] == "@@type@@" {
grok {
match => { "message" => "%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} %{DATA:syslog_program}(?:\[%{POSINT:syslog_pid}\])?: %{GREEDYDATA:syslog_message}" }
add_field => [ "received_at", "%{@timestamp}" ]
add_field => [ "received_from", "%{host}" ]
}
date {
match => [ "syslog_timestamp", "MMM d HH:mm:ss", "MMM dd HH:mm:ss" ]
}
}
}
@@output@@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment