Last active
February 20, 2016 00:20
-
-
Save kaustavha/bc3c7152b0c88bb22730 to your computer and use it in GitHub Desktop.
Logstash kafka benchmark
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input { | |
kafka { | |
topic_id => 'observations.json' | |
zk_connect => 'localhost:2181' | |
type => 'kafka' | |
auto_offset_reset => 'smallest' | |
consumer_threads => 12 | |
codec => 'snappy' | |
} | |
} | |
filter { | |
if [type] == "kafka" { | |
metrics { | |
meter => "events" | |
add_tag => "metric" | |
} | |
} | |
} | |
output { | |
if "metric" in [tags] { | |
stdout { | |
codec => line { | |
format => "rate: %{[events][rate_1m]}" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment