Skip to content

Commit

Permalink
Allow running as console application on Windows (#2754)
Browse files Browse the repository at this point in the history
  • Loading branch information
MondayHopscotch authored and danielnelson committed Jan 25, 2018
1 parent f9c0aa1 commit d831dbc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ be deprecated eventually.

### Bugfixes

- [#2754](https://github.com/influxdata/telegraf/pull/2754): allow running as console application on Windows
- [#2633](https://github.com/influxdata/telegraf/pull/2633): ipmi_sensor: allow @ symbol in password
- [#2077](https://github.com/influxdata/telegraf/issues/2077): SQL Server Input - Arithmetic overflow error converting numeric to data type int.
- [#2262](https://github.com/influxdata/telegraf/issues/2262): Flush jitter can inhibit metric collection.
Expand Down
3 changes: 2 additions & 1 deletion cmd/telegraf/telegraf.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ var fUsage = flag.String("usage", "",
"print usage for a plugin, ie, 'telegraf --usage mysql'")
var fService = flag.String("service", "",
"operate on the service")
var fRunAsConsole = flag.Bool("console", false, "run as console application (windows only)")

var (
nextVersion = "1.6.0"
Expand Down Expand Up @@ -358,7 +359,7 @@ func main() {
return
}

if runtime.GOOS == "windows" {
if runtime.GOOS == "windows" && !(*fRunAsConsole) {
svcConfig := &service.Config{
Name: "telegraf",
DisplayName: "Telegraf Data Collector Service",
Expand Down

0 comments on commit d831dbc

Please sign in to comment.