嗨,我已经为Icinga 2安装了logstash插件。我已经通过发出icinga2 api setup设置了API,然后重新启动了Icinga 2服务。

我正在使用/etc/icinga2/conf.d/api-users.conf中提供的Icinga 2 API用户名和密码,并尝试将少量日志从Logstash推送到Icinga 2并得到以下问题

[2017-10-04T07:14:14,565][ERROR][logstash.outputs.icinga  ] Request failed {:host=>"xxxxxxxxxx", :port=>5665, :path=>"/v1/actions/process-check-result?service=%25%7Bhostname%7D%21dummy", :body=>"{\"plugin_output\":\"83.149.9.216 - - [04/Jan/2015:05:13:42 +0000] \\\"GET /presentations/logstash-monitorama-2013/images/Test-search.png HTTP/1.1\\\" 200 203023 \\\"http://semicomplete.com/presentations/logstash-monitorama-2013/\\\" \\\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36\\\"\"}", :error=>#<OpenSSL::SSL::SSLError: certificate verify failed>}


这是我的配置文件

input {
    file {
        path => "/home/logstashtest/*"
        start_position => beginning
        ignore_older => 0
    }
}
filter {
    if ([message] !~ "83.149.9.216") {
        drop { }
    }
    grok {
        match => { "message" => "%{COMBINEDAPACHELOG}"}
    }
}
output {
      icinga {
        host           => "*****" //Remote Icinga Host
        user           => "*****" //Icinga 2 Api User
        password       => "*****" //Icinga 2 Api Password
        action         => "process-check-result"
        action_config  => {
          plugin_output => "%{message}"
        }
        icinga_host    => "%{hostname}"
        icinga_service => "dummy"

      }
}


我是否需要在pki / ca.crt中提供的请求中传递SSL证书的路径。有没有办法在Logstash中禁用SSL验证?请帮助我解决导致问题的原因

最佳答案

默认情况下,Logstash插件的Icinga输出使用SSL连接到Icinga API。我已通过在插件中设置ssl_verify => false来禁用

08-28 06:20