Is there a way to configure input only metricbeat events in the logstash.conf file?
Generally, inputs will include all beat events like input { beats { port => 5044 } }. But i am looking to input ONLY metricbeat events so that my filter will have specific condition to only metricsets. The index is not getting created if type is checked in the output field. Please suggest the right way to achieve.
I need similar to below. This logstash.conf file should only take metricbeat data and NOT filebeat or heartbeat data
input {
metricbeat { * }
}
filter { }
output {
if [@metadata][beat] and [@metadata][beat] = "metricsets" { # or if [type] = "metricsets" {
elasticsearch {
hosts => ["elasticserch.server:9200"]
manage_template => false
index => "metricbeat-index-%{+YYYY.MM.dd}"
}
}
}
I was looking for input that should take only the metricbeat data as input. I though of using id plugin for this purpose. It seems there is no such option. Is that right?
The beat input will accept all the data. The question is what happens with it then. You can use filters to for example only filter out the metricbeat data and drop all filebeat data.
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.