【问题标题】:Icinga output Plugin for Logstash causing OpenSSL::SSL::SSLError:certificate verify failed IssueLogstash 的 Icinga 输出插件导致 OpenSSL::SSL::SSLError:certificate verify failed 问题
【发布时间】:2018-03-15 23:51:02
【问题描述】:

您好,我已经为 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 验证?请帮助我解决问题的原因

【问题讨论】:

    标签: ssl logstash monitoring icinga icinga2


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-11-30
      • 1970-01-01
      • 2012-05-30
      • 2016-01-15
      • 2016-08-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多