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
|
aliases_path: /var/www/html/meshviewer/data/aliases.json
|
||||||
influxdb:
|
influxdb:
|
||||||
enable: false
|
enable: false
|
||||||
|
host: http://localhost:8086
|
||||||
database: ffhb
|
database: ffhb
|
||||||
username:
|
username:
|
||||||
password:
|
password:
|
||||||
|
@ -34,6 +34,7 @@ type Config struct {
|
|||||||
} `yaml:"nodes"`
|
} `yaml:"nodes"`
|
||||||
Influxdb struct {
|
Influxdb struct {
|
||||||
Enable bool `yaml:"enable"`
|
Enable bool `yaml:"enable"`
|
||||||
|
Addr string `yaml:"host"`
|
||||||
Database string `yaml:"database"`
|
Database string `yaml:"database"`
|
||||||
Username string `yaml:"username"`
|
Username string `yaml:"username"`
|
||||||
Password string `yaml:"password"`
|
Password string `yaml:"password"`
|
||||||
|
@ -22,7 +22,7 @@ type StatsDb struct {
|
|||||||
func NewStatsDb() *StatsDb {
|
func NewStatsDb() *StatsDb {
|
||||||
// Make client
|
// Make client
|
||||||
c, err := client.NewHTTPClient(client.HTTPConfig{
|
c, err := client.NewHTTPClient(client.HTTPConfig{
|
||||||
Addr: "http://localhost:8086",
|
Addr: config.Influxdb.Addr,
|
||||||
Username: config.Influxdb.Username,
|
Username: config.Influxdb.Username,
|
||||||
Password: config.Influxdb.Password,
|
Password: config.Influxdb.Password,
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user