Skip to content

Instantly share code, notes, and snippets.

@doberloh
Created February 26, 2016 23:42
Show Gist options
  • Save doberloh/68cab39249e013d04ad6 to your computer and use it in GitHub Desktop.
Save doberloh/68cab39249e013d04ad6 to your computer and use it in GitHub Desktop.
input {
gelf {
type => "lb12202"
port => 12202
}
gelf {
type => "lb12203"
port => 12203
}
gelf {
type => "lb12204"
port => 12204
}
}
filter {
if [facility] =~ /^p(gatew|tr)ay$/ {
mutate {
rename => [ "@timestamp", "client_timestamp" ]
}
ruby {
code => "event['@timestamp'] = LogStash::Timestamp.new"
}
}
}
output {
elasticsearch {
hosts => ["es.endpoint:80"]
workers => 32
}
if [type] == "lb12202"
{statsd {
host => "statsd.foo.bar"
port => 8125
sender => "aws-cffbccc2"
increment => "message.gelf"
}}
if [type] == "lb12203"
{statsd {
host => "statsd.foo.bar"
port => 8125
sender => "aws-cffbccc2"
increment => "message.gelf"
}}
if [type] == "lb12204"
{statsd {
host => "statsd.foo.bar"
port => 8125
sender => "aws-cffbccc2"
increment => "message.gelf"
}}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment