output.elasticsearch:
# Array of hosts to connect to.
hosts: ["localhost:9200"]
index: "eslog-%{[elasticsearch.cluster.name]}-%{[fileset.name]}-%{+yyyy.MM.dd}"
I found that the above configuration will cause errors due to elasticsearch.cluster.name, how do I configure it?
@jsoriano Thanks for your reply, I confirmed that elasticsearch.cluster.name exists as I was able to look it up on ES. I started with the index name without elasticsearch.cluster.name, and the insert was successful, and then when I looked up the inserted data on ES, it included elasticsearch.cluster.name
But do all events contain these fields? It might happen that the errors are produced by events that don't contain these fields, even if other events contain it.
You can try to use indeces, and configure a different index for events that don't contain this field, something like this:
@jsoriano Thanks, I'll try it some time, theoretically this should not happen because I use the official elasticsearch module and I only enabled the server.log log collection, the rest I have disabled
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.