Add option to skip ssk verification
This commit is contained in:
parent
54f8172208
commit
e981f87635
|
@ -71,6 +71,9 @@ Defaults to `icinga`
|
|||
Instead of stopping on connection loss, Icingabeat will try to reconnect to the
|
||||
API periodically. Defaults to `10s`
|
||||
|
||||
#### `skip_ssl_verify`
|
||||
Skip verification of SSL certificates. Defaults to `false`
|
||||
|
||||
### Eventstream
|
||||
These settings are eventsream specific, they apply only to the eventstream. To
|
||||
disable evenstream completely, comment out the whole section.
|
||||
|
|
|
@ -19,6 +19,9 @@ icingabeat:
|
|||
# Defines how fast to reconnect to the API after a connection loss
|
||||
retry_interval: 10s
|
||||
|
||||
# Skip SSL verification
|
||||
skip_ssl_verify: false
|
||||
|
||||
# Icingabeat supports capturing of an evenstream and periodical polling of the
|
||||
# Icinga status data.
|
||||
#
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
|
||||
func requestURL(bt *Icingabeat, method string, URL *url.URL) (*http.Response, error) {
|
||||
transport := &http.Transport{
|
||||
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
||||
TLSClientConfig: &tls.Config{InsecureSkipVerify: bt.config.SkipSSLVerify},
|
||||
}
|
||||
|
||||
client := &http.Client{
|
||||
|
|
|
@ -12,6 +12,7 @@ type Config struct {
|
|||
User string `config:"user"`
|
||||
Password string `config:"password"`
|
||||
RetryInterval time.Duration `config:"retry_interval"`
|
||||
SkipSSLVerify bool `config:"skip_ssl_verify"`
|
||||
Eventstream EventstreamConfig `config:"eventstream"`
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,9 @@ icingabeat:
|
|||
# Defines how fast to reconnect to the API after a connection loss
|
||||
retry_interval: 10s
|
||||
|
||||
# Skip SSL verification
|
||||
skip_ssl_verify: false
|
||||
|
||||
# Icingabeat supports capturing of an evenstream and periodical polling of the
|
||||
# Icinga status data.
|
||||
#
|
||||
|
|
|
@ -19,6 +19,9 @@ icingabeat:
|
|||
# Defines how fast to reconnect to the API after a connection loss
|
||||
retry_interval: 10s
|
||||
|
||||
# Skip SSL verification
|
||||
skip_ssl_verify: false
|
||||
|
||||
# Icingabeat supports capturing of an evenstream and periodical polling of the
|
||||
# Icinga status data.
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue