Skip to content

Instantly share code, notes, and snippets.

@tonymeehan
Created February 18, 2020 18:24
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 tonymeehan/34298b5bff737ee8475970a75308fdfa to your computer and use it in GitHub Desktop.
Save tonymeehan/34298b5bff737ee8475970a75308fdfa to your computer and use it in GitHub Desktop.
output {
if [@metadata][pipeline] {
elasticsearch {
hosts => ["http://localhost:9200"]
index => "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"
user => "elastic"
password => "changeme"
pipeline => "%{[@metadata][pipeline]}"
}
} else {
elasticsearch {
hosts => ["http://localhost:9200"]
index => "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"
user => "elastic"
password => "changeme"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment