Ignore the ssl cert part for nginx status
Ignore the cert part as its not going to match top level domain (http://www.xyz.com) if https behind many hosts (host.serverice.datacenter.xyz.com )
This commit is contained in:
parent
2eb9deb8b0
commit
2f417d431d
|
@ -5,6 +5,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"crypto/tls"
|
||||||
"net/url"
|
"net/url"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
@ -61,6 +62,8 @@ var tr = &http.Transport{
|
||||||
var client = &http.Client{
|
var client = &http.Client{
|
||||||
Transport: tr,
|
Transport: tr,
|
||||||
Timeout: time.Duration(4 * time.Second),
|
Timeout: time.Duration(4 * time.Second),
|
||||||
|
// ignore the cert part as its not going to match top level domain if https behind many hosts
|
||||||
|
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
|
||||||
}
|
}
|
||||||
|
|
||||||
func (n *Nginx) gatherUrl(addr *url.URL, acc telegraf.Accumulator) error {
|
func (n *Nginx) gatherUrl(addr *url.URL, acc telegraf.Accumulator) error {
|
||||||
|
|
Loading…
Reference in New Issue