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

Option to register mtail as a windows service in windows binaries #542

Open
nralbers opened this issue Jun 16, 2021 · 2 comments
Open

Option to register mtail as a windows service in windows binaries #542

nralbers opened this issue Jun 16, 2021 · 2 comments
Labels
enhancement This is considered a feature request, not currently guaranteed by the code or design today help wanted mtail-Operating Issues related to deploying and running mtail

Comments

@nralbers
Copy link

I'm using mtail on windows servers, and while it's working really well for my use case, automating the deployment and reconfiguration is a nuisance because there aren't many good options for running a process in the background that can be stopped and started to load new configuration. Because windows assumes that you'll use a service for that.
While i'm aware that there are wrapper programs available to allow running arbitrary binaries as a windows service, i'm then relying on another third party piece of software with little or no support.

Is it possible to add a register and run as service option to mtail? It appears there are a few go library options for implementing this. See https://www.reddit.com/r/golang/comments/7hr0cx/running_a_go_exe_as_a_windows_service/ for a discussion of possibilities. Also this package: https://pkg.go.dev/golang.org/x/sys/windows/svc?utm_source=godoc

Suggestions:
--install-windows-service option to register service. This registers the mtail executable as a service, using the rest of the command line options as service start parameters.

@jaqx0r jaqx0r added enhancement This is considered a feature request, not currently guaranteed by the code or design today mtail-Operating Issues related to deploying and running mtail labels Jun 20, 2021
@jaqx0r
Copy link
Contributor

jaqx0r commented Jun 20, 2021

Thanks for the suggestion! Would you be able to develop a PR?

I don't have a Windows environment to test with so I could make something but won't be able to verify it before I commit the code.

@jaqx0r jaqx0r changed the title [enhancement][operating]Option to register mtail as a windows service in windows binaries Option to register mtail as a windows service in windows binaries Jun 20, 2021
@nralbers
Copy link
Author

I'm not a go developer, but I can easily compile and test a branch to verify the code. I work in infrastructure monitoring so I have a bunch of vagrant test boxes I can validate builds against.
So while i'm not in a position to develop a pull request on my own, I can assist in getting one tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is considered a feature request, not currently guaranteed by the code or design today help wanted mtail-Operating Issues related to deploying and running mtail
Projects
None yet
Development

No branches or pull requests

2 participants