Skip to content

Instantly share code, notes, and snippets.

@hamiltont
Last active August 29, 2015 14:06
Show Gist options
  • Save hamiltont/988732b727466202375c to your computer and use it in GitHub Desktop.
Save hamiltont/988732b727466202375c to your computer and use it in GitHub Desktop.
input {
stdin {
type => "stdin-type"
}
#file {
# type => "syslog"
# path => [ "/var/log/*.log", "/var/log/messages", "/var/log/syslog" ]
# start_position => "beginning"
#}
file {
type => "couchpotato"
path => [ "/logs/couchpotato/CouchPotato.*" ]
start_position => "beginning"
# Combine tracebacks into one event
codec => multiline {
pattern => "^%{MONTHNUM}-%{MONTHDAY} %{TIME} %{LOGLEVEL}"
negate => true
what => previous
}
}
}
filter {
# Get rid of color codes
mutate {
gsub => [ "message", "\e\[0m", ""]
}
grok {
# 09-04 20:48:55 INFO [ie.providers.info.omdbapi] Found: Only Lovers Left Alive (2013)
match => [ "message", "%{MONTHNUM}-%{MONTHDAY} %{TIME} %{LOGLEVEL} \[(?:%{SPACE})%{NOTSPACE:module}\] %{GREEDYDATA:couch_message}" ]
}
}
output {
elasticsearch {
embedded => true
}
}
@hamiltont
Copy link
Author

Thanks @untergeek! This was driving me crazy :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment