Maintenance#

Updates#

Automatic Updates#

The WatchGrid agent features an integrated automatic update mechanism. During regular operation, the agent checks our release server for newer binary versions. If an update is available, the binary is downloaded, verified, and replaced automatically. The service then restarts to execute the updated binary.

Manual Updates#

You can manually trigger an update check at any time:

watchgrid -update

This checks if a newer version is available and updates the local binary if needed.

Grace Periods & False Alarm Prevention#

To prevent false alarms during maintenance or configuration changes, WatchGrid includes automated grace periods:

  • Configuration Updates: When changing reporting intervals or alarm thresholds, a grace period is applied to avoid transient alert spikes during adjustments.

  • Server Releases: Following WatchGrid server releases, a gracetime window is granted so agents can re-synchronize without triggering connectivity alarms.

Managing the Systemd Service#

Since the agent runs as a systemd service, standard systemctl commands can be used:

# Check service status
systemctl status watchgrid

# Restart the service
systemctl restart watchgrid

# Stop / Start the service
systemctl stop watchgrid
systemctl start watchgrid

CLI Parameters (Command Line Flags)#

The agent supports command line flags for local diagnostics and explicit actions:

Flag

Description

-help

Displays help message listing all command line parameters.

-version

Outputs currently installed agent version and exits.

-info

Collects host system info (OS, version, architecture, uptime) and prints it locally without sending.

-isend

Collects host system info and sends it to the WatchGrid server.

-metrics

Collects current metrics (CPU, RAM, Disk, open ports & services) and prints them locally.

-msend

Collects current metrics and sends them to the WatchGrid server.

-update

Manually checks for updates and updates the binary if a new release is available.

Note: Running the agent without arguments performs an automatic update check and sends system info (-isend) and metrics (-msend) to the server.

Updating API Tokens#

If you regenerated your organization’s API token in the Organization tab or need to switch tokens on an existing server, update the agent using one of the following methods:

  1. Re-run the One-Liner Installer: Execute the setup command with the existing Agent ID and the new API Token:

    curl -sfL https://wgri.de/install | WG_AGENT="<AGENT_ID>" WG_TOKEN="<NEW_API_TOKEN>" sh -
    
  2. Manual Configuration Update: Alternatively, update the "api_token" field directly inside /etc/watchgrid/config.json and restart the service:

    systemctl restart watchgrid
    

For detailed setup instructions, see Setup.