Skip to content
Snippets Groups Projects
Commit 32e06a48 authored by Pierre Fersing's avatar Pierre Fersing Committed by Cameron Sparr
Browse files

Keep -config-directory when running as Windows service (#2330)

* Keep -config-directory when running as Windows service

* Update changelog
parent 2932db84
No related branches found
No related tags found
No related merge requests found
...@@ -11,10 +11,10 @@ It is highly recommended that all users migrate to the new riemann output plugin ...@@ -11,10 +11,10 @@ It is highly recommended that all users migrate to the new riemann output plugin
### Features ### 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. - [#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. - [#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. - [#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. - [#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. - [#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. - [#2277](https://github.com/influxdata/telegraf/pull/2277): add integer metrics for Consul check health state.
......
...@@ -327,6 +327,9 @@ func main() { ...@@ -327,6 +327,9 @@ func main() {
if *fConfig != "" { if *fConfig != "" {
(*svcConfig).Arguments = []string{"-config", *fConfig} (*svcConfig).Arguments = []string{"-config", *fConfig}
} }
if *fConfigDirectory != "" {
(*svcConfig).Arguments = append((*svcConfig).Arguments, "-config-directory", *fConfigDirectory)
}
err := service.Control(s, *fService) err := service.Control(s, *fService)
if err != nil { if err != nil {
log.Fatal("E! " + err.Error()) log.Fatal("E! " + err.Error())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment