mirror of
https://github.com/elastic/logstash.git
synced 2025-04-25 07:07:54 -04:00
- adde xample exec+split config
This commit is contained in:
parent
ca871dd8a3
commit
90580469ec
1 changed files with 25 additions and 0 deletions
25
etc/examples/exec-split.conf
Normal file
25
etc/examples/exec-split.conf
Normal 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 } }
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue