DocsMonitor

Server agent

One command on a Linux server. CPU, memory, disk and your Docker containers show up in Watchdock within a minute.

3 min readAny systemd distroRuns as a service

1Requirements

RequirementNotes
Linux with systemdUbuntu, Debian, CentOS, RHEL, Amazon Linux
Root accessThe installer registers a systemd service
Python 3.8+ and curlInstalled for you if missing
Workspace tokenStarts with pos_. Owners and admins can create it

2Install

In Watchdock, open Servers › Add server. It shows this command with your workspace token already filled in. SSH into the server and run it:

bash
curl -fsSL https://api.watchdock.cc/install.sh | WATCHDOCK_API_TOKEN=pos_your_token sudo -E bash

Keep the -E. It carries WATCHDOCK_API_TOKEN across sudo. Without it the installer runs with no token and the server never registers.

The agent runs as a systemd service, so it survives reboots on its own.

3Verify it's reporting

The server appears as Online as soon as the agent sends its first report. If it doesn't, check the service:

bash
sudo systemctl status watchdock-agent

If Docker is installed, its containers show up under the server automatically. There's no separate Docker step.

ProNginx log collection, container logs and starting or stopping containers need the Pro plan. Server and container metrics work on every plan.

What it reports

Each report carries hostname, OS, uptime, CPU (cores, usage and 1, 5 and 15 minute load), memory, disk, swap, network traffic and process count. How often it reports depends on your plan, and each report doubles as a heartbeat:

PlanReports everyOffline after
Hobby10 minutes20 minutes of silence
Pro5 minutes10 minutes of silence
Team1 minute2 minutes of silence

A server goes offline after two missed reports in a row, and an incident opens.

Health follows the worst resource, so a server with critical memory shows as critical even when CPU is fine.

ResourceWarningCritical
CPU80% and up95% and up
Memory85% and up95% and up
Disk80% and up90% and up

Troubleshooting

The install script fails straight away

Usually a missing sudo or a read-only filesystem. Run it as root or with passwordless sudo.

The server never appears

The token didn't survive sudo. Re-run with -E, or export WATCHDOCK_API_TOKEN before calling sudo.

It shows Offline but the box is up

Read the agent's logs with journalctl -u watchdock-agent. A firewall or proxy blocking outbound HTTPS is the usual cause.