2017-10-04 116 views
0

嗨我已經安裝了Icinga 2的logstash插件。我已經通過發佈icinga2 api setup安裝了API,然後重新啓動了Icinga 2服務。Icinga輸出插件Logstash導致OpenSSL :: SSL :: SSLError:證書驗證失敗問題

我正在使用/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驗證?請幫助我解決導致此問題的原因

回答

0

Logstash插件的Icinga輸出默認使用SSL連接到Icinga API。我通過在插件

中設置 ssl_verify => false來禁用
相關問題