config influxdb host
This commit is contained in:
parent
756d9e3697
commit
18acdd7642
|
@ -17,6 +17,7 @@ nodes:
|
|||
aliases_path: /var/www/html/meshviewer/data/aliases.json
|
||||
influxdb:
|
||||
enable: false
|
||||
host: http://localhost:8086
|
||||
database: ffhb
|
||||
username:
|
||||
password:
|
||||
|
|
|
@ -34,6 +34,7 @@ type Config struct {
|
|||
} `yaml:"nodes"`
|
||||
Influxdb struct {
|
||||
Enable bool `yaml:"enable"`
|
||||
Addr string `yaml:"host"`
|
||||
Database string `yaml:"database"`
|
||||
Username string `yaml:"username"`
|
||||
Password string `yaml:"password"`
|
||||
|
|
|
@ -22,7 +22,7 @@ type StatsDb struct {
|
|||
func NewStatsDb() *StatsDb {
|
||||
// Make client
|
||||
c, err := client.NewHTTPClient(client.HTTPConfig{
|
||||
Addr: "http://localhost:8086",
|
||||
Addr: config.Influxdb.Addr,
|
||||
Username: config.Influxdb.Username,
|
||||
Password: config.Influxdb.Password,
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue