diff --git a/plugins/inputs/nginx/nginx.go b/plugins/inputs/nginx/nginx.go index b15b539de..b674abb7d 100644 --- a/plugins/inputs/nginx/nginx.go +++ b/plugins/inputs/nginx/nginx.go @@ -5,6 +5,7 @@ import ( "fmt" "net" "net/http" + "crypto/tls" "net/url" "strconv" "strings" @@ -61,6 +62,8 @@ var tr = &http.Transport{ var client = &http.Client{ Transport: tr, 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 {