mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
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:
parent
18c4ec2b35
commit
e1485422e3
1 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue