- adde xample exec+split config

This commit is contained in:
Jordan Sissel 2011-08-17 01:08:04 -07:00
parent ca871dd8a3
commit 90580469ec

View file

@ -0,0 +1,25 @@
input {
exec {
type => "foo"
# Grab one run of top
command => "top -bn1"
# Every 5 seconds
interval => 5
}
}
filter {
split { type => "foo" }
# Parse fields out of top. This assumes the default headers of:
# PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
grok {
type => "foo"
pattern => "%{NUMBER:pid} *%{WORD:user} *%{NUMBER:priority} *%{NUMBER:nice} *%{NOTSPACE:vmsize} *%{NOTSPACE:rss} *%{NOTSPACE:sharedmemory} *%{WORD:state} *%{NUMBER:cpu_pct} *%{NUMBER:memory_pct} *%{NOTSPACE:cputime} %{DATA:command}"
}
}
output { stdout { debug => true } }