mirror of
https://github.com/Icinga/icingabeat.git
synced 2025-04-08 17:15:05 +02:00
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
|
Instead of stopping on connection loss, Icingabeat will try to reconnect to the
|
||||||
API periodically. Defaults to `10s`
|
API periodically. Defaults to `10s`
|
||||||
|
|
||||||
|
#### `skip_ssl_verify`
|
||||||
|
Skip verification of SSL certificates. Defaults to `false`
|
||||||
|
|
||||||
### Eventstream
|
### Eventstream
|
||||||
These settings are eventsream specific, they apply only to the eventstream. To
|
These settings are eventsream specific, they apply only to the eventstream. To
|
||||||
disable evenstream completely, comment out the whole section.
|
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
|
# Defines how fast to reconnect to the API after a connection loss
|
||||||
retry_interval: 10s
|
retry_interval: 10s
|
||||||
|
|
||||||
|
# Skip SSL verification
|
||||||
|
skip_ssl_verify: false
|
||||||
|
|
||||||
# Icingabeat supports capturing of an evenstream and periodical polling of the
|
# Icingabeat supports capturing of an evenstream and periodical polling of the
|
||||||
# Icinga status data.
|
# Icinga status data.
|
||||||
#
|
#
|
||||||
|
@ -11,7 +11,7 @@ import (
|
|||||||
|
|
||||||
func requestURL(bt *Icingabeat, method string, URL *url.URL) (*http.Response, error) {
|
func requestURL(bt *Icingabeat, method string, URL *url.URL) (*http.Response, error) {
|
||||||
transport := &http.Transport{
|
transport := &http.Transport{
|
||||||
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
TLSClientConfig: &tls.Config{InsecureSkipVerify: bt.config.SkipSSLVerify},
|
||||||
}
|
}
|
||||||
|
|
||||||
client := &http.Client{
|
client := &http.Client{
|
||||||
|
@ -12,6 +12,7 @@ type Config struct {
|
|||||||
User string `config:"user"`
|
User string `config:"user"`
|
||||||
Password string `config:"password"`
|
Password string `config:"password"`
|
||||||
RetryInterval time.Duration `config:"retry_interval"`
|
RetryInterval time.Duration `config:"retry_interval"`
|
||||||
|
SkipSSLVerify bool `config:"skip_ssl_verify"`
|
||||||
Eventstream EventstreamConfig `config:"eventstream"`
|
Eventstream EventstreamConfig `config:"eventstream"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,6 +19,9 @@ icingabeat:
|
|||||||
# Defines how fast to reconnect to the API after a connection loss
|
# Defines how fast to reconnect to the API after a connection loss
|
||||||
retry_interval: 10s
|
retry_interval: 10s
|
||||||
|
|
||||||
|
# Skip SSL verification
|
||||||
|
skip_ssl_verify: false
|
||||||
|
|
||||||
# Icingabeat supports capturing of an evenstream and periodical polling of the
|
# Icingabeat supports capturing of an evenstream and periodical polling of the
|
||||||
# Icinga status data.
|
# Icinga status data.
|
||||||
#
|
#
|
||||||
|
@ -19,6 +19,9 @@ icingabeat:
|
|||||||
# Defines how fast to reconnect to the API after a connection loss
|
# Defines how fast to reconnect to the API after a connection loss
|
||||||
retry_interval: 10s
|
retry_interval: 10s
|
||||||
|
|
||||||
|
# Skip SSL verification
|
||||||
|
skip_ssl_verify: false
|
||||||
|
|
||||||
# Icingabeat supports capturing of an evenstream and periodical polling of the
|
# Icingabeat supports capturing of an evenstream and periodical polling of the
|
||||||
# Icinga status data.
|
# Icinga status data.
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user