graylog service won't start after installed it on silent mode

Environment : Windows 10 and Windows 2022

Installed graylog in silent mode:

$exePath = “\computername\share\graylog_sidecar_installer_1.4.0-1.exe”
$serverUrl = “http://XXX.XXX.XXX.XXX:9000/api/
$serverApiToken = “ABC”

Check if the file exists

if (Test-Path $exePath) {
# Define the arguments for the installer
$installerArgs = “/S”, “-server_url”, $serverUrl, “-server_api_token”, $serverApiToken

# Perform a silent installation with parameters
Start-Process -FilePath $exePath -ArgumentList $installerArgs -Wait

} else {
Write-Host “Installer file not found: $exePath”

But graylog service won’t start.
If Install in normal mode everything works fine.

If you anyone have experience to install graylog client in silent mode please help to share the script.
Thank you in advance

For an install command you can use something like:

graylog_sidecar_installer.exe" /S -SERVERURL=https://GRAYLOGSERVER.DOMAIN.COM/api -APITOKEN=YOURAPITOKEN

Can you verify the service is installed?:

sc query graylog-sidecar

If the service won’t start it is possible the configuration file doesn’t have correct values for API URL and API token.

The log file (C:\Program Files\Graylog\sidecar\logs\sidecar.log) may also have some clues.

Hope that helps.

1 Like