Created
December 20, 2011 01:01
-
-
Save louiszuckerman/1499710 to your computer and use it in GitHub Desktop.
logstash parser for glusterfs logs
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 { | |
file { | |
path => "/var/log/glusterfs/*.log" | |
sincedb_path => "/var/tmp/.glusterfs.sincedb" | |
format => "plain" | |
type => "glusterfs" | |
} | |
file { | |
path => "/var/log/glusterfs/bricks/*.log" | |
sincedb_path => "/var/tmp/.glusterfs.bricks.sincedb" | |
format => "plain" | |
type => "glusterfsbrick" | |
} | |
} | |
filter { | |
grok { | |
pattern => "%{GLUSTERLOG}" | |
patterns_dir => "/opt/logstash/patterns" | |
type => "glusterfs" | |
} | |
grok { | |
pattern => "%{GLUSTERLOG}" | |
patterns_dir => "/opt/logstash/patterns" | |
type => "glusterfsbrick" | |
} | |
grep { | |
match => [ "timestamp", ".*" ] | |
type => "glusterfs" | |
} | |
grep { | |
match => [ "timestamp", ".*" ] | |
type => "glusterfsbrick" | |
} | |
date { | |
timestamp => "yyyy-MM-dd HH:mm:ss.SSSSSS" | |
type => "glusterfs" | |
} | |
date { | |
timestamp => "yyyy-MM-dd HH:mm:ss.SSSSSS" | |
type => "glusterfsbrick" | |
} | |
} | |
output { | |
-- your outputs -- | |
} | |
=========== | |
/opt/logstash/patterns/glusterfs: | |
GLUSTERTIMESTAMP %{DATE} %{TIME} | |
GLUSTERCODEPART %{NOTSPACE:codefile}:%{INT:codeline}:%{NOTSPACE:codefunc} | |
GLUSTERLOG \[%{GLUSTERTIMESTAMP:timestamp}\] %{NOTSPACE:level} \[%{GLUSTERCODEPART}\] %{NOTSPACE:subvolume}: %{GREEDYDATA:message} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment