diff --git a/config/config.go b/config/config.go index fba26c7..94b0f64 100644 --- a/config/config.go +++ b/config/config.go @@ -24,6 +24,10 @@ type ReaderCfg struct { type ExporterCfg struct { Type string `yaml:"type"` Addr string `yaml:"addr,omitempty"` + URL string `yaml:"url,omitempty"` + Token string `yaml:"token,omitempty"` + User string `yaml:"user,omitempty"` + Pass string `yaml:"pass,omitempty"` JSONFile string `yaml:"json_file,omitempty"` } diff --git a/main.go b/main.go index 5ddd337..30f926c 100644 --- a/main.go +++ b/main.go @@ -42,8 +42,8 @@ func main() { es = append(es, prom) case "dev": es = append(es, exporters.NewDevExporter(ec.JSONFile)) - case "telegraf": - // es = append(es, exporters.NewTelegraf(ec.Addr)) + case "influxdb": + es = append(es, exporters.NewInfluxDBExporter(ec.URL, ec.Token, ec.User, ec.Pass)) } }