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
Running VMagent (Windows) as a service #3781
Comments
Hello, currently it's not possible in native mode for vmagent. It doesn't have window service integration. You have to use some windows service wrapper like https://github.com/winsw/winsw |
Thank you, Are there plans for windows service integration? If yes, is there a link I could track? |
For now, there is no such plans, maybe @valyala could prioritize it. Related integration example https://cs.opensource.google/go/x/sys/+/refs/tags/v0.5.0:windows/svc/example/ |
@machinedrummer , VictoriaMetrics team has no good expertise in Windows, so it would be great to get help from the community for implementing this feature request. |
Thank you, I understand, for now I will use winsw. In case someone else is looking on how to run it as a service, this is how I tested. Download vmagent-windows-amd64-prod.exe and place it under C:\Program Files\windows_exporter Create C:\Program Files\windows_exporter\VMAgent.xml
Download winsw from https://github.com/winsw/winsw/releases/download/v2.12.0/WinSW-x64.exe From elevated powershell run
Please note that for winsw .XML name must match .EXE name |
I've created a Chocolatey packages which installs WinSW as well as VMAgent automatically and adds it as Service to Windows. Thanks for @machinedrummer as I use the same XML as base and it is working flawless right now. |
Use service configuration example from #3781 (comment) Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>
Use service configuration example from #3781 (comment) Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>
Use service configuration example from #3781 (comment) Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com> (cherry picked from commit cc7d5b7) Signed-off-by: hagen1778 <roman@victoriametrics.com>
…ue, which describes how to run VictoriaMetrics as Windows service This is a follow-up for cc7d5b7 The original issue #3781 contains up-to-date information on how to run VictoriaMetrics components as Windows service, plus it may contain additional information about this case such as #3781 (comment) , so it is better to refer this issue from the docs.
…ue, which describes how to run VictoriaMetrics as Windows service This is a follow-up for cc7d5b7 The original issue #3781 contains up-to-date information on how to run VictoriaMetrics components as Windows service, plus it may contain additional information about this case such as #3781 (comment) , so it is better to refer this issue from the docs.
…ue, which describes how to run VictoriaMetrics as Windows service This is a follow-up for cc7d5b7 The original issue VictoriaMetrics#3781 contains up-to-date information on how to run VictoriaMetrics components as Windows service, plus it may contain additional information about this case such as VictoriaMetrics#3781 (comment) , so it is better to refer this issue from the docs.
Hi! Is that available anywhere public? |
Hey @lapo-luchini , unfortunately the release process of chocolatey is not as straight forward as we hoped so it is not in their public repo. But we do have an Installation guide on how to use chocolatey for a manual installation: https://github.com/symflower/vmutils-bin/tree/main/Choco We are still working on a chocolatey release but for now this is the manual step is the only thing we can provide. |
Is there a guide on how to run VMAgent as a Windows Service?
When I try to setup a service it keeps crashing (Windows gets no response). I can see process is started but seems exe does not support running as a Windows service.
The service did not respond to the start or control request in a timely fashion.
Example of service setup, environment variables are set and location is correct. I can see storage folder created and persistent-queue gets populated with files. I can execute it from shell and it runs fine but I'm unable to setup as a windows service.
The text was updated successfully, but these errors were encountered: