Last active
August 29, 2015 14:06
-
-
Save hamiltont/988732b727466202375c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I used this updated pattern to catch both:
pattern => [ "%{MONTHNUM}-%{MONTHDAY} %{TIME} %{LOGLEVEL} \[(?:%{SPACE})%{NOTSPACE:module}\] %{GREEDYDATA:couch_message}" ]