It does exist and is used for conditional elasticsearch outputs so I know there is a value to it. Here is what I get in the document as a string literal "%{[@metadata][pipeline]}"
if [@metadata][pipeline] {
elasticsearch {
id => "beats-pipeline"
hosts => ["https://siem-elasticsearch-01:9200"]
ilm_enabled => true
manage_template => false
index => "%{[@metadata][beat]}-%{[@metadata][version]}"
pipeline => "%{[@metadata][pipeline]}"
user => beats_ingest
password => *******
cacert => "/etc/logstash/ca.crt"
ssl => true
}
} else {
Correction, This is working when there is a pipeline such as "filebeat-7.8.1-elasticsearch-gc-pipeline". When the pipeline is not available it defaults to the string literal so I added some conditional procpessing to mutate for my needs:
It does not help you now, but note that the output was modified yesterday so that if the sprintf evaluates down to "" then it is ignored. As of now, that is going to pass "None" through to elasticsearch, which may complain.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.