Skip to content

Running VMagent (Windows) as a service #3781

Description

@machinedrummer

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.

$Name = "VMAgent"
$params = @{
    Name = $Name
    BinaryPathName = '"C:\VMAgent\vmagent-windows-amd64-prod.exe" -envflag.enable'
    DisplayName = $Name
    StartupType = "Auto"
    Description = "$Name is used to send server event logs and metrics to centralized monitoring server."
  }
  New-Service @params

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions