Workers

Workers are remote Go processes that pull jobs from the server and return check results (protocol 2.0+).

Management

Run with Docker

docker run -d \
  --name monitoring-worker \
  -e SERVER_HOST=https://your-monitoring-server.com \
  -e WORKER_KEY_HASH=your_unique_worker_key_here \
  akeb/monitoring-worker-go:latest

Set AUTO_UPDATE=false in Docker images if you prefer image tags over binary self-replace.

Run without Docker — download binary from GitHub

No Go toolchain on the server. Assets: monitoring-worker-linux-amd64 / linux-arm64 (+ .sha256) from AKEB/monitoring-worker-go releases. Set VER to the latest tag.

# Pick the latest tag on https://github.com/AKEB/monitoring-worker-go/releases
# Use linux-arm64 on Raspberry Pi / ARM hosts.
VER=v2.4.0
ARCH=amd64   # or arm64

sudo mkdir -p /opt/monitoring-worker
sudo curl -fsSL -o /opt/monitoring-worker/monitoring-worker \
  "https://github.com/AKEB/monitoring-worker-go/releases/download/${VER}/monitoring-worker-linux-${ARCH}"
sudo chmod 755 /opt/monitoring-worker/monitoring-worker

# Optional checksum check:
# curl -fsSL -o /tmp/monitoring-worker.sha256 \
#   "https://github.com/AKEB/monitoring-worker-go/releases/download/${VER}/monitoring-worker-linux-${ARCH}.sha256"
# echo "$(cat /tmp/monitoring-worker.sha256)  /opt/monitoring-worker/monitoring-worker" | sha256sum -c -

sudo tee /opt/monitoring-worker/.env >/dev/null <<'EOF'
TZ=Europe/Moscow
SERVER_HOST=https://monitoring.example.com/
WORKER_KEY_HASH=paste_worker_key_here
PROTOCOL_VERSION=2.0
AUTO_UPDATE=true
EOF

sudo tee /etc/systemd/system/monitoring-worker.service >/dev/null <<'EOF'
[Unit]
Description=Monitoring worker
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
WorkingDirectory=/opt/monitoring-worker
ExecStart=/opt/monitoring-worker/monitoring-worker
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target
EOF

sudo systemctl daemon-reload
sudo systemctl enable --now monitoring-worker
journalctl -u monitoring-worker -f

The worker loads .env from the working directory or next to the binary. Full variables: Environment → Worker.

Optional: build from source

Only if you need a custom binary — not required for production hosts.

# Only if you need a custom build — prefer GitHub Releases on servers.
go build -buildvcs=false -o monitoring-worker ./cmd/worker/
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -buildvcs=false -o monitoring-worker-linux-amd64 ./cmd/worker/
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -buildvcs=false -o monitoring-worker-linux-arm64 ./cmd/worker/
Workers admin
Workers admin