Update metrics.rb example

Update the example because output doesn't have the message parameter, instead it should use a a codec.
Also update the way how logstash is executed.
This commit is contained in:
Alejandro E Brito Monedero 2014-05-13 11:30:49 +02:00 committed by Suyog Rao
parent 18c4ec2b35
commit e1485422e3

View file

@ -74,14 +74,16 @@ require "logstash/namespace"
# # only emit events with the 'metric' tag
# if "metric" in [tags] {
# stdout {
# message => "rate: %{events.rate_1m}"
# codec => line {
# format => "rate: %{events.rate_1m}"
# }
# }
# }
# }
#
# Running the above:
#
# % java -jar logstash.jar agent -f example.conf
# % ./logstash-1.4.1/bin/logstash agent -f example.conf
# rate: 23721.983566819246
# rate: 24811.395722536377
# rate: 25875.892745934525