diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e5865e7c..5131f50eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,10 +11,10 @@ It is highly recommended that all users migrate to the new riemann output plugin ### Features -- [#2141](https://github.com/influxdata/telegraf/pull/2141): Logparser handles newly-created files. - [#2137](https://github.com/influxdata/telegraf/pull/2137): Added userstats to mysql input plugin. - [#2179](https://github.com/influxdata/telegraf/pull/2179): Added more InnoDB metric to MySQL plugin. - [#2251](https://github.com/influxdata/telegraf/pull/2251): InfluxDB output: use own client for improved through-put and less allocations. +- [#2330](https://github.com/influxdata/telegraf/pull/2330): Keep -config-directory when running as Windows service. - [#1900](https://github.com/influxdata/telegraf/pull/1900): Riemann plugin rewrite. - [#1453](https://github.com/influxdata/telegraf/pull/1453): diskio: add support for name templates and udev tags. - [#2277](https://github.com/influxdata/telegraf/pull/2277): add integer metrics for Consul check health state. diff --git a/cmd/telegraf/telegraf.go b/cmd/telegraf/telegraf.go index 0f94c6e2c..398617e09 100644 --- a/cmd/telegraf/telegraf.go +++ b/cmd/telegraf/telegraf.go @@ -327,6 +327,9 @@ func main() { if *fConfig != "" { (*svcConfig).Arguments = []string{"-config", *fConfig} } + if *fConfigDirectory != "" { + (*svcConfig).Arguments = append((*svcConfig).Arguments, "-config-directory", *fConfigDirectory) + } err := service.Control(s, *fService) if err != nil { log.Fatal("E! " + err.Error())