Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Installation of second service fails #5727

Closed
shawn3231 opened this issue Apr 15, 2019 · 3 comments · Fixed by #5770
Closed

Windows Installation of second service fails #5727

shawn3231 opened this issue Apr 15, 2019 · 3 comments · Fixed by #5770
Labels
feature request Requests for new plugin and for new features to existing plugins platform/windows
Milestone

Comments

@shawn3231
Copy link

System info:

Windows Server 2008R2

Steps to reproduce:

  1. Using the referenced steps (https://github.com/influxdata/telegraf/blob/master/docs/WINDOWS_SERVICE.md), I attempted to add a second telegraf service:
    "telegraf.exe --config "C:\Program Files\telegraf\telegraf-cluster.conf" --service install --service-name telegraf-2",

Expected behavior:

I expected to see a second service to show up that is using the "telegraf-2" service name

Actual behavior:

I receive the following error:
2019/04/15 19:07:17 E! Failed to install Telegraf Data Collector Service: The name is already in use as either a service name or a service display name.

In this case the display name is the duplicate value.

Additional info:

I see in the telegraf.go file (https://github.com/influxdata/telegraf/blob/master/cmd/telegraf/telegraf.go) that on line 348, that the DisplayName value is hard coded to always be "Telegraf Data Collector Service", I would hope that it is easy enough to add an additional flag.string ~line 62 for fDisplayName and change the referenced DisplayName on line 348 from "Telegraf Data Collector Service" to "*fDisplayName"

@danielnelson
Copy link
Contributor

Seems like a good idea, we could have a --service-display-name option. Is this something you could add and test?

@danielnelson danielnelson added feature request Requests for new plugin and for new features to existing plugins platform/windows labels Apr 15, 2019
@shawn3231
Copy link
Author

Sorry, I am going to sound really bad, but I am new to GitHub so it might take me a while to figure out how to use go and dep on a windows environment and figure out the proper processes of submitting such code updates to later release versions. But I will try unless you have a quick guide handy to help to newbies dive in.

@danielnelson
Copy link
Contributor

It might be helpful to look at the appveyor script since it sets up everything from scratch on Windows. If you don't have time though no worries, we can still make sure it gets done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requests for new plugin and for new features to existing plugins platform/windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants