I am not sure if this is the correct syntax to add a field. I believe it is:
fields:
log_type: "iis"
If both the configurations are same, please let me know. I am not quite sure.
Secondly, is there a field called [fields][log_type] in Elasticsearch? I believe it would not be a nested field and should just be reference as log_type.
I got this to work but only from a property on the log, I used the pre-defined
if [fileset][module] == "iis" {
....
The filebeat.yml was reading the config okay with that syntax. I noticed there wasn't any [fields][log_type] in elastic search so therefore my filebeat.yml config was not working.
I suppose my question is what is the best approach to tag or label filebeat inputs from within the filebeat.yml? What is the best practice?
Both the approaches are perfectly fine. I don't think there is any such best practice associated with this.
However, using the if statement does add one check. What we have done is added a field called index name in our inputs. We use the index name field to decide where it gets indexed.
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.