简体   繁体   中英

Logstash hostname split up

My hostnames are something like "companyname-instancename".

When the logs get sent to logstash and then stored in elasticsearch, they seem to get split up at the "-".

How can I prevent this in logstash? Do I have to change the hosts field?

Elasticsearch, being a text search engine, is analyzing the data for you and making tokens out of it.

You need to set the field to be not_analyzed to prevent this. Since everyone hits this "problem", logstash will make a ".raw" version of the field for you, eg myField.raw.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM