Add support for standard proxy env vars in outputs. (#3212)
This commit is contained in:
parent
d0b690f040
commit
7b08f9d099
|
@ -48,6 +48,9 @@ func (a *Amon) Connect() error {
|
||||||
return fmt.Errorf("serverkey and amon_instance are required fields for amon output")
|
return fmt.Errorf("serverkey and amon_instance are required fields for amon output")
|
||||||
}
|
}
|
||||||
a.client = &http.Client{
|
a.client = &http.Client{
|
||||||
|
Transport: &http.Transport{
|
||||||
|
Proxy: http.ProxyFromEnvironment,
|
||||||
|
},
|
||||||
Timeout: a.Timeout.Duration,
|
Timeout: a.Timeout.Duration,
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
|
@ -55,7 +55,11 @@ func (d *Datadog) Connect() error {
|
||||||
if d.Apikey == "" {
|
if d.Apikey == "" {
|
||||||
return fmt.Errorf("apikey is a required field for datadog output")
|
return fmt.Errorf("apikey is a required field for datadog output")
|
||||||
}
|
}
|
||||||
|
|
||||||
d.client = &http.Client{
|
d.client = &http.Client{
|
||||||
|
Transport: &http.Transport{
|
||||||
|
Proxy: http.ProxyFromEnvironment,
|
||||||
|
},
|
||||||
Timeout: d.Timeout.Duration,
|
Timeout: d.Timeout.Duration,
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
|
@ -53,6 +53,7 @@ func NewHTTP(config HTTPConfig, defaultWP WriteParams) (Client, error) {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
transport = http.Transport{
|
transport = http.Transport{
|
||||||
|
Proxy: http.ProxyFromEnvironment,
|
||||||
TLSClientConfig: config.TLSConfig,
|
TLSClientConfig: config.TLSConfig,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,6 +80,9 @@ func (l *Librato) Connect() error {
|
||||||
"api_user and api_token are required fields for librato output")
|
"api_user and api_token are required fields for librato output")
|
||||||
}
|
}
|
||||||
l.client = &http.Client{
|
l.client = &http.Client{
|
||||||
|
Transport: &http.Transport{
|
||||||
|
Proxy: http.ProxyFromEnvironment,
|
||||||
|
},
|
||||||
Timeout: l.Timeout.Duration,
|
Timeout: l.Timeout.Duration,
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue