Skip to content

Commit

Permalink
#325 增加Logstash从业务日志进行统计的演示,分析日志内容分门别类到不同的counter
Browse files Browse the repository at this point in the history
Calvin committed Feb 19, 2014

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 7fba54f commit 9116ae8
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions support/logstash/metrics_shipper/shipper.conf
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 9116ae8

Please sign in to comment.