The Nocward Agent is a small program for Windows and Linux hosts. It collects host metrics and pushes them to Monitoring over HTTPS - no inbound port on the host, no SNMP needed.
What it reports
- CPU, memory, disk, inodes and swap usage, load per core, uptime;
- Windows: the state of chosen services, pending reboot, event log errors, disk latency, TLS certificate expiry, DHCP scopes of a Windows DHCP server and - on domain controllers - LDAP bind health;
- Linux: WireGuard peers (handshake age, traffic), IPsec security associations and processes by name;
- applications you switch on: nginx, Apache, PostgreSQL, MySQL/MariaDB, Redis, memcached, Docker, HAProxy, RabbitMQ, Elasticsearch/OpenSearch, PHP-FPM, any Prometheus exporter, and your own checks and scripts.
A starter set of threshold alerts for these metrics (CPU or memory above 90 % on average, disk above 90 %, a watched service stopped, an application not answering, a certificate expiring within 14 days…) exists from the start.
1. Prepare in Monitoring
- Settings → Access and audit → API Keys → create a key of type Host agent (for example
agents) and copy it. A host agent key can only send the agent’s own data. Do not use a collector key on a monitored server - it can read every device’s credentials. - Devices → Add device: name the host, enter its IP, choose Agent / Application (push metrics) and save.
- Open the new device and copy its Device ID.
2a. Install on Linux
Install the package (.deb for Debian/Ubuntu, .rpm for RHEL, Rocky, Alma and Fedora), then edit /etc/nocward-agent/agent.env:
NOCWARD_API_URL=https://nms.example.com/api
NOCWARD_API_KEY=<the key>
NOCWARD_DEVICE_ID=<the device ID>
#PUSH_INTERVAL_SECONDS=60
Start it:
systemctl enable --now nocward-agent
journalctl -u nocward-agent -f
2b. Install on Windows
Run the MSI installer. Its wizard asks for the server URL (https://nms.example.com/api), the API key, the device ID and the push interval, then installs and starts the NocwardAgent service.
For a scripted installation, run in an administrator PowerShell, from the folder with nocward-agent.exe:
.\install-service.ps1 -ApiUrl "https://nms.example.com/api" `
-ApiKey "<the key>" -DeviceId "<the device ID>"
The agent runs as a Windows service and writes to the Windows Event Log. To watch specific services, set the machine environment variable WATCH_SERVICES to a comma-separated list of service names (for example NTDS,DNS,W3SVC) and restart the service.
3. Check
Within a minute the device page shows the host’s metrics and Live Readings lists them. If nothing arrives, check the agent’s log for authentication errors (wrong key or device ID) or connection errors (URL, firewall, certificate).
Application templates
Each application is checked only when its setting is filled in agent.env; every one reports app_up.<name> (1 up, 0 down) plus its own metrics. Examples:
NGINX_STATUS_URL=http://127.0.0.1/nginx_status
POSTGRES_DSN=postgres://nocward:password@127.0.0.1:5432/postgres?sslmode=disable
REDIS_ADDR=127.0.0.1:6379
PROMETHEUS_TARGETS=http://127.0.0.1:9216/metrics
PROCESS_NAMES=sshd,nginx,postgres
CUSTOM_CHECKS=queue_depth=/usr/local/bin/queue-depth
The comments in the installed agent.env describe every setting and the minimum rights each application’s monitoring user needs. For Docker, never give the agent the Docker socket: start the read-only proxy that answers container states only, and point the agent at it:
systemctl enable --now nocward-docker-proxy
# agent.env
DOCKER_SOCKET=/run/nocward-docker-proxy/docker.sock
Script checks on the host
Put executable scripts into the agent’s scripts folder - /etc/nocward-agent/scripts.d on Linux, C:\ProgramData\NocwardAgent\scripts on Windows (.ps1, .bat/.cmd, .exe, .vbs, .py). Each one runs on the push interval (a subfolder named in seconds, for example scripts.d/300/, runs its scripts that often) and appears by itself as a Script (agent) check under Service checks.
Scripts follow the usual monitoring plugin convention - exit code 0 OK, 1 WARNING, 2 CRITICAL; see Service checks. They run with the agent’s rights, so the agent skips a script or folder that non-administrators could change: on Linux it must be owned by root (or the agent’s user) and not writable by others.
Push metrics from your own application
Any program can push metrics the same way. Create an Agent / Application device, then send:
curl -X POST https://nms.example.com/api/ingest/app-metrics \
-H "X-API-Key: <key>" -H "Content-Type: application/json" \
-d '{"device_id": "<device ID>", "metrics": [
{"metric_key": "queue_depth", "value": 42, "unit": "jobs",
"tag": "custom", "time": "2026-11-11T10:00:00Z"}
]}'
The device page shows the exact example for that device. Pushed metrics work with graphs, Live Readings and threshold alerts. If a pushing device stops sending, Monitoring notices and raises it like any other device going silent.