parent
37e45f8680
commit
5b70e1f2df
|
@ -103,7 +103,7 @@ func (m *MongoDB) gatherServer(server *Server, acc telegraf.Accumulator) error {
|
||||||
dialAddrs[0], err.Error())
|
dialAddrs[0], err.Error())
|
||||||
}
|
}
|
||||||
dialInfo.Direct = true
|
dialInfo.Direct = true
|
||||||
dialInfo.Timeout = time.Duration(10) * time.Second
|
dialInfo.Timeout = 5 * time.Second
|
||||||
|
|
||||||
if m.Ssl.Enabled {
|
if m.Ssl.Enabled {
|
||||||
tlsConfig := &tls.Config{}
|
tlsConfig := &tls.Config{}
|
||||||
|
|
|
@ -43,7 +43,7 @@ func testSetup(m *testing.M) {
|
||||||
log.Fatalf("Unable to parse URL (%s), %s\n", dialAddrs[0], err.Error())
|
log.Fatalf("Unable to parse URL (%s), %s\n", dialAddrs[0], err.Error())
|
||||||
}
|
}
|
||||||
dialInfo.Direct = true
|
dialInfo.Direct = true
|
||||||
dialInfo.Timeout = time.Duration(10) * time.Second
|
dialInfo.Timeout = 5 * time.Second
|
||||||
sess, err := mgo.DialWithInfo(dialInfo)
|
sess, err := mgo.DialWithInfo(dialInfo)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("Unable to connect to MongoDB, %s\n", err.Error())
|
log.Fatalf("Unable to connect to MongoDB, %s\n", err.Error())
|
||||||
|
|
|
@ -80,10 +80,10 @@ func (p *Prometheus) gatherURL(url string, acc telegraf.Accumulator) error {
|
||||||
|
|
||||||
var rt http.RoundTripper = &http.Transport{
|
var rt http.RoundTripper = &http.Transport{
|
||||||
Dial: (&net.Dialer{
|
Dial: (&net.Dialer{
|
||||||
Timeout: 10 * time.Second,
|
Timeout: 5 * time.Second,
|
||||||
KeepAlive: 30 * time.Second,
|
KeepAlive: 30 * time.Second,
|
||||||
}).Dial,
|
}).Dial,
|
||||||
TLSHandshakeTimeout: 10 * time.Second,
|
TLSHandshakeTimeout: 5 * time.Second,
|
||||||
TLSClientConfig: &tls.Config{
|
TLSClientConfig: &tls.Config{
|
||||||
InsecureSkipVerify: p.InsecureSkipVerify,
|
InsecureSkipVerify: p.InsecureSkipVerify,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue