Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的主机名类似于“companyname-instancename”。
当日志被发送到logstash然后存储在elasticsearch中时,它们似乎在“-”处被分割。
我怎样才能在logstash中防止这种情况?我必须更改主机字段吗?
Elasticsearch 是一个文本搜索引擎,它正在为您分析数据并从中获取令牌。
您需要将该字段设置为 not_analyzed 以防止这种情况发生。由于每个人都遇到了这个“问题”,logstash 将为您制作一个“.raw”版本的字段,例如 myField.raw。