无法启动Filebeat:配置Elasticsearch输出时索引格式报错
Filebeat启动报错解决:can not convert 'object' into 'string'
错误原因
你配置的output.elasticsearch.index使用了数组格式["test-index"],但该字段要求为字符串类型,Filebeat无法将数组(object)转换为字符串,因此启动失败。
修复步骤
- 打开你的
/etc/filebeat/filebeat.yml配置文件 - 将
index: ["test-index"]修改为index: "test-index"
正确配置示例
filebeat.inputs: - type: filestream id: input1-id paths: - /home/yasser/data/sample1.log output.elasticsearch: hosts: ["https://localhost:9200"] index: "test-index"
修改完成后重新启动Filebeat,即可正常将指定日志文件的内容写入Elasticsearch的test-index索引中。
内容的提问来源于stack exchange,提问作者Yasser Alsawy
相关产品推荐
相关产品推荐

