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:
Sachin Rase 2016-07-07 17:45:59 -07:00 committed by GitHub
parent 2eb9deb8b0
commit 2f417d431d
1 changed files with 3 additions and 0 deletions

View File

@ -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 {