Skip to content

Instantly share code, notes, and snippets.

@devicenull
Created March 4, 2013 21:17
Show Gist options
  • Save devicenull/5085753 to your computer and use it in GitHub Desktop.
Save devicenull/5085753 to your computer and use it in GitHub Desktop.
input {
file {
path => "/var/log/nginx/access_log"
charset => "UTF-8"
type => "access_log"
}
}
output {
redis { host => "XXXX" data_type => "list" key => "logstash" }
}
input {
file {
path => "/var/log/messages"
charset => "UTF-8"
type => "syslog"
}
}
filter {
grok {
type => "syslog"
pattern => [ "%{SYSLOGLINE}" ]
}
date {
type => "syslog"
match => [ "timestamp", "MMM d HH:mm:ss", "MMM dd HH:mm:ss" ]
}
mutate {
type => "syslog"
exclude_tags => "_grokparsefailure"
replace => [ "@message", "%{message}" ]
}
mutate {
type => "syslog"
remove => [ "message", "logsource", "timestamp" ]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment