Last active
December 17, 2015 15:39
-
-
Save robertely/5633493 to your computer and use it in GitHub Desktop.
Example Logstash config for consuming from collectd over amqp. Outputs to stdout.
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 { | |
rabbitmq { | |
host => "rmq.xxx.xxx.com" | |
port => 5672 | |
vhost => "metrics" | |
user => "xxxx" | |
password => "xxxx" | |
exchange => "collectd.logstash.plain" | |
queue => "<%= @node[:fqdn] %>" | |
exclusive => false | |
arguments => ["x-message-ttl", 300000] | |
threads => 24 | |
prefetch_count => 500 | |
ack => false | |
format => "plain" | |
type => "collectdPlain" | |
} | |
} | |
filter { | |
grok { | |
pattern => "machines_%{DATA:datacenter}_%{DATA:hostname}\.%{DATA:path} %{NUMBER:value} %{INT:clienttime}" | |
type => "collectdPlain" | |
} | |
mutate { | |
gsub =>[ | |
"path", ".value", "" | |
,"path", "counter-", "" | |
,"path", "gauge-", "" | |
,"path", "_", "." | |
] | |
type => "collectdPlain" | |
} | |
} | |
output { | |
stdout { | |
debug => true debug_format => "j" | |
type => "collectdPlain" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
java -jar logstash-1.1.12-flatjar.jar agent -w 10 -f collectd-logstash-consumer-example.conf