Logstash tried to load a plugin’s code, but failed 解法[solved]
Mar 19, 2021
關鍵字: Logstash, error, solution, 解法
昨天嘗試使用 jmx output to logstash,結果碰到以下 error msg:
[2021-03-18T18:06:04,154][ERROR][logstash.plugins.registry] Tried to load a plugin's code, but failed. {:exception=>uch file to load -- logstash/inputs/jmx>, :path=>"logstash/inputs/jmx", :type=>"input", :name=>"jmx"}
[2021-03-18T18:06:04,164][ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineActine_id:main, :exception=>"Java::JavaLang::IllegalStateException", :message=>"Unable to configure plugins: (PluginLoa't find any input plugin named 'jmx'. Are you sure this is correct? Trying to load the jmx input plugin resulted in ch file to load -- logstash/inputs/jmx",
...
查了一下發現是預設沒有安裝 jmx input module,需先執行:
bin/logstash-plugin install logstash-input-jmx
會出現以下訊息:
Validating logstash-input-jmx
Installing logstash-input-jmx
Installation successful
接著再執行一次 logstash
...
[2021-03-18T18:19:10,974][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600}...
大功告成!!
除了去官網查資料,也可以去以下列表查(比較方便一點):
https://www.tutorialspoint.com/logstash/logstash_plugins.htm