Hello,
I have a problem to send events logstast-Icinga.
My output:
output {
icinga {
host => "X.X.X.X"
user => "logstash"
password => "xxxxxxx"
ssl_verify => "false"
action => "process-check-result"
action_config => {
exit_status => "2"
plugin_output => "%{message}"
author => "logstash"
comment => "Logstash Output" }
icinga_host => "%{host}"
icinga_service => "mysql"
}
Error:
[WARN ] 2018-10-08 10:36:16.005 [Ruby-0-Thread-9@[main]>worker3: :1] icinga - Request failed {:host=>"X.X.X.X", :port=>5665, :path=>"/v1/actions/process-check-result?service=%7B%22name%22%3A%22debian%22%7D%21mysql", :body=>"{"exit_status":"2","plugin_output":"2018-10-08 10:34:07 140314514966272 [Note] InnoDB: Shutdown completed; log sequence number 5388084","author":"logstash","comment":"Logstash Output"}", :error=>#<StandardError: StandardError>}
[WARN ] 2018-10-08 10:36:16.012 [Ruby-0-Thread-9@[main]>worker3: :1] icinga - Response: {:response_code=>"404", :response_body=>"{"error":404.0,"status":"No objects found."}"}
If I write icinga_host => "%{hostname}" --> same problem
Name of host is: debian
If I write: icinga_host => "debian", the events it send OK.
Thanks