Skip to content

Instantly share code, notes, and snippets.

@jordansissel
Created December 6, 2012 01:54
Show Gist options
  • Save jordansissel/4221225 to your computer and use it in GitHub Desktop.
Save jordansissel/4221225 to your computer and use it in GitHub Desktop.
% JRUBY_OPTS= bin/logstash agent -e '
input {
generator { type => foo }
}
filter {
metrics { meter => "events" }
# Drop the generated events.
grep { type => foo match => [ "@message", "." ] negate => true }
}
output {
stdout { message => "%{@timestamp} rate: %{@fields}" }
}'
Using experimental plugin 'metrics'. This plugin is untested and may change in the future. For more information about plugin statuses, see http://logstash.net/docs/1.1.6.dev/plugin-status {:level=>:warn}
2012-12-06T01:52:37.057Z rate: {}
2012-12-06T01:52:42.058Z rate: {}
2012-12-06T01:52:47.057Z rate: {"events.count":49141,"events.rate_1m":0.0,"events.rate_5m":0.0,"events.rate_15m":0.0}
2012-12-06T01:52:52.064Z rate: {"events.count":178799,"events.rate_1m":10452.2,"events.rate_5m":10452.2,"events.rate_15m":10452.2}
2012-12-06T01:52:57.056Z rate: {"events.count":306047,"events.rate_1m":11697.332339860475,"events.rate_5m":10709.595743926715,"events.rate_15m":10538.475678989345}
2012-12-06T01:53:02.056Z rate: {"events.count":438521,"events.rate_1m":12807.808892645719,"events.rate_5m":10955.48107864151,"events.rate_15m":10621.841250877758}
2012-12-06T01:53:07.056Z rate: {"events.count":566866,"events.rate_1m":13878.573380913127,"events.rate_5m":11207.447507891173,"events.rate_15m":10708.145510121345}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment