Skip to content

Instantly share code, notes, and snippets.

@RafPe
Last active September 28, 2015 18:33
Show Gist options
  • Save RafPe/eaa421f60a206cd2eb22 to your computer and use it in GitHub Desktop.
Save RafPe/eaa421f60a206cd2eb22 to your computer and use it in GitHub Desktop.
This is simple logstash config file just to get you quickly up and running especially when testing with Docker
input {
tcp {
port => 25826
type => syslog
}
udp {
port => 25826
type => syslog
}
}
filter {
if [type] == "syslog" {
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}" ]
}
syslog_pri { }
date {
match => [ "syslog_timestamp", "MMM d HH:mm:ss", "MMM dd HH:mm:ss" ]
}
}
}
output
{
elasticsearch { host => db }
stdout { codec => rubydebug }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment