Skip to content

Instantly share code, notes, and snippets.

@louiszuckerman
Created April 13, 2012 16:03
Show Gist options
  • Save louiszuckerman/2377958 to your computer and use it in GitHub Desktop.
Save louiszuckerman/2377958 to your computer and use it in GitHub Desktop.
Logstash load average monitor
input {
exec {
command => "echo `date +'%z %Y-%m-%d'``uptime`"
type => "loadaverages"
interval => 10
}
}
filter {
grok {
type => "loadaverages"
pattern => "%{ISO8601_TIMEZONE:tz} %{DATE_EU:date} %{TIME:time} up %{GREEDYDATA:uptime} load average: %{NUMBER:load1}, %{NUMBER:load5}, %{NUMBER:load15}"
add_field => [ "ts", "%{date}T%{time}%{tz}" ]
}
date {
type => "loadaverages"
ts => "ISO8601"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment