Skip to content

Instantly share code, notes, and snippets.

@mlabouardy
Last active January 21, 2019 18:59
Show Gist options
  • Save mlabouardy/dfdd9d7b8961f400415bd2ed6183e44b to your computer and use it in GitHub Desktop.
Save mlabouardy/dfdd9d7b8961f400415bd2ed6183e44b to your computer and use it in GitHub Desktop.
Expost Gelf and UDP inputs
input {
udp {
type => lambda
port => 7000
}
gelf {
type => docker
port => 5000
}
}
filter {
if [message] =~ /^{.*}$/ {
if [type] == "lambda" {}
if [type] == "docker" {}
}
}
output {
if [type] == "lambda" {
elasticsearch {
hosts => 'https://elasticsearch.internal.domain.com:443'
index => 'functions-%{+YYYY.MM.dd}'
}
} else {
elasticsearch {
hosts => 'https://elasticsearch.internal.domain.com:443'
index => 'containers-%{+YYYY.MM.dd}'
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment