From 1243df50e867e85114d586dc1dd089fe6991658c Mon Sep 17 00:00:00 2001 From: Jordan Sissel Date: Wed, 17 Aug 2011 18:00:31 -0700 Subject: [PATCH] - fix bytes example --- docs/tutorials/metrics-from-logs.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/tutorials/metrics-from-logs.md b/docs/tutorials/metrics-from-logs.md index 90bd76368..22bc7d4e4 100644 --- a/docs/tutorials/metrics-from-logs.md +++ b/docs/tutorials/metrics-from-logs.md @@ -41,7 +41,10 @@ Logstash can do the above simpler and without much coding skill: } output { - statsd { increment => "apache.response.%{response}" } + statsd { + # Count one hit every event by response + increment => "apache.response.%{response}" + } } The above uses grok to parse fields out of apache logs and using the statsd @@ -50,9 +53,11 @@ are parsing apache logs fully, we can trivially add additional metrics: output { statsd { - increment => [ - "apache.response.%{response}", - "apache.bytes.%{bytes}", + # Count one hit every event by response + increment => "apache.response.%{response}" + + # Use the 'bytes' field from the apache log as the count value. + count => [ "apache.bytes", "%{bytes}" ] ] } }