Skip to content

Instantly share code, notes, and snippets.

@kaustavha
Last active February 20, 2016 00:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaustavha/bc3c7152b0c88bb22730 to your computer and use it in GitHub Desktop.
Save kaustavha/bc3c7152b0c88bb22730 to your computer and use it in GitHub Desktop.
Logstash kafka benchmark
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