Filebeat error loading config file: yaml: did not find expected key

Intro How to Solve Filebeat error loading config file: yaml: did not find expected key

這篇介紹How to Solve Filebeat error loading config file: yaml: did not find expected key。

發生情境

1
2
3
啟動filebeat時,process不會出現。用ps -ef |grep filebeat指令檢查
去logs看發現有出現Filebeat error loading config file: yaml: did not find expected key相關error message
造成process不會執行。

解決方法

1
2
3
問題出在.yml設定檔可能有出現filebeat不認得的格式或字元
logs通常會指出是哪一個.yml有問題
這邊記錄碰到的問題是編輯yml檔案時,不小心多個一個特殊字元造成parse錯誤