Closed frunzales closed 4 years ago
I don't have access to a Windows system to test on, but if you can get something working I'd definitely consider the patches.
Ideally it would fit with the existing release process.
I'd be interested in this too. We are currently using an in-house chocolatey package which basically wraps it in nssm
to have a service.
The golang 'svc' package provides means to build Windows services. wmi_exporter and telegraf make use of it.
Examples can be found here: https://github.com/golang/sys/tree/master/windows/svc/example
The bosun project has a very good example on how this works: https://github.com/bosun-monitor/bosun/blob/master/cmd/scollector/service_windows.go
Perhaps we could implement similar functionality and then use smth like
exporter_exporter.exe -winsvc install
@frunzales I had a look at the bosun example, it looks reasonable enough. If the flag can be hidden on non-winodws OSes, that would be ideal. I'll happily accept a PR, but I can't work on this myself (just don't have access to something to test on, sorry).
Currently, exporter_exporter does not have means to run as a windows service. Running it as a service on windows without a service wrapper a la nssm/winsw would be ideal.
I also investigated the possibility of building it as an MSI package with INSTALL_OPTIONS a la wmi_exporter.
Is this worth investigating?