Servers & Containers
Alert when a server runs hot, fills a disk or goes quiet, and when containers keep restarting, run out of memory or stop.
Server and container monitors judge the metrics the Zharp agent already sends from your machines. Nothing is probed from outside, so the form has no Regions section for these types. Install the agent first; until a server reports, a monitor on it waits rather than alerting.
Set one up
- 1Pick the type
In Create monitor, open Monitor type and choose Server monitor or Container monitor, under Infrastructure & services.
- 2Choose what it watches
A server monitor watches one server or All servers. A container monitor watches containers on one server or on any, by name: an exact name such as
api, a pattern with*such asapi-*, or nothing for every container. On every server, the monitor goes down when any of them crosses the line, and its message says which. - 3Set the line
Pick what alerts under Alert on, then the threshold and how long it must hold — see below.
Server monitors
| Alert on | The check fails when | Default |
|---|---|---|
| CPU usage | CPU stayed at or above the threshold for the whole of For at least | 90% for 5 min |
| Memory usage | Memory stayed at or above the threshold for the whole of For at least | 90% for 5 min |
| Disk space | A disk is at least this full. Leave the mount empty for every disk, or name one, such as /var/lib/postgresql | 85% |
| Stops reporting | The server has sent nothing for this many minutes | 5 min |
"Over 90% for 5 minutes" means the lowest reading in those 5 minutes was over 90%, so a short spike doesn't alert. The agent reports every 30 seconds, and at least two readings are needed. A filesystem mounted at several paths counts once, under its shortest path.
Stops reporting on All servers only watches servers that were still reporting when the monitor was created, so a machine retired long ago doesn't page anyone. Pick a server by name to watch it whatever its past. Remove a server you've retired from Servers & Containers with its ⋯ menu.
Container monitors
| Alert on | The check fails when | Default |
|---|---|---|
| Keeps restarting | A container restarted at least this many times within Within | 3 in 15 min |
| Out-of-memory kills | A container was killed for running out of memory within Within | 1 in 15 min |
| Stopped | A container that matches has stopped (its exit code is in the message) | — |
| CPU usage | A container used at least this share of its server's CPU (100% is every core busy) for the whole of Within | 90% for 5 min |
| Memory usage | A container used at least this share of its own memory limit for the whole of Within | 90% for 5 min |
Memory is measured against the container's limit, so containers without a limit of their own are skipped — they can only run out of the server's memory, which a server monitor watches. A container that was removed stops counting about 10 minutes after it was last seen.
When it goes down
- The monitor goes down and opens an incident, which alerts the people and channels on the monitor. The message names each server, disk or container over the line, with its reading.
- The monitor's page shows what is over the line right now, each linked to its server in Servers & Containers.
- It comes back up, and the incident resolves, once nothing it watches is over the line.
If the agent sends nothing for a moment — it restarted, or the network dropped — the check waits instead of flapping the monitor. Use Stops reporting to be told when a server goes quiet.