From 9116ae8116a3c57911fe54824d45f94e24777161 Mon Sep 17 00:00:00 2001 From: Calvin Date: Wed, 19 Feb 2014 13:57:44 +0800 Subject: [PATCH] =?UTF-8?q?#325=20=E5=A2=9E=E5=8A=A0Logstash=E4=BB=8E?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E6=97=A5=E5=BF=97=E8=BF=9B=E8=A1=8C=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E7=9A=84=E6=BC=94=E7=A4=BA=EF=BC=8C=E5=88=86=E6=9E=90?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E5=86=85=E5=AE=B9=E5=88=86=E9=97=A8=E5=88=AB?= =?UTF-8?q?=E7=B1=BB=E5=88=B0=E4=B8=8D=E5=90=8C=E7=9A=84counter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- support/logstash/metrics_shipper/shipper.conf | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/support/logstash/metrics_shipper/shipper.conf b/support/logstash/metrics_shipper/shipper.conf index b8d425015..cc741cd3b 100644 --- a/support/logstash/metrics_shipper/shipper.conf +++ b/support/logstash/metrics_shipper/shipper.conf @@ -7,8 +7,11 @@ input { filter { if [type] == "business" { + grok { + match => [ "message", "%{TIME},%{WORD:entity},%{WORD:action},*." ] + } metrics { - meter => "business-events" + meter => ["business-events.%{entity}.%{action}"] clear_interval => 10 flush_interval => 10 rates => [] @@ -19,15 +22,16 @@ filter { output { if "metrics" in [tags] { # metrics log - stdout { - debug => true - } graphite { host => "localhost" port => 2003 - metrics => ["business-events","%{business-events.count}"] + fields_are_metrics => true + include_metrics => ["^business-events.*"] metrics_format => "showcase.*" } + stdout { + debug => true + } } else { # business log stdout { debug => false