Add HTTP authentification to influxdb metric backend
This commit is contained in:
parent
031451abab
commit
5ce4a2d05c
3 changed files with 20 additions and 2 deletions
|
@ -157,7 +157,9 @@ func (w *influxDBWriter) Write(bp influxdb.BatchPoints) error {
|
|||
func (w *influxDBWriter) initWriteClient() (influxdb.Client, error) {
|
||||
if w.config.Protocol == "http" {
|
||||
return influxdb.NewHTTPClient(influxdb.HTTPConfig{
|
||||
Addr: w.config.Address,
|
||||
Addr: w.config.Address,
|
||||
Username: w.config.Username,
|
||||
Password: w.config.Password,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue