Appearance
os
The os plugin reports the host itself. It sends CPU counters, memory, real disks, load average, uptime, network throughput, IPv4 addresses and a short list of known service processes. Turn it on for every machine you run an agent on. It is the plugin that fills in the host's OS details and last-seen time on the system record.
Enable it
Add os to the plugins array.
json
{
"plugins": ["os"],
"os": {
"refreshInterval": 30000
}
}| Option | Default | What it does |
|---|---|---|
refreshInterval | 30000 | Milliseconds between reports. The plugin sends one report at startup, then one per interval. |
The plugin always reports under the unique id os and names the service after the machine's hostname. A name or uniqueId in this section has no effect.
What it reports
One payload per interval.
hostname,platform,type,release,arch.cpusis the rawos.cpus()array, with per-coretimes.totalmemandfreememin bytes.availableis the memory the kernel can hand out without swapping. On Linux it comes fromMemAvailablein/proc/meminfo. On macOS it is free + inactive + speculative + purgeable pages fromvm_stat. Elsewhere it falls back tofreemem.diskslists real drives fromdf, sorted fullest first. Each entry hasdevice,fstype,mount,total,used,freeandpct. The plugin drops pseudo filesystems such as tmpfs, overlay and squashfs, loop devices, and bind-mount duplicates. On macOS it keeps/and/Volumes/*, and reports the Data volume as/.networkhasrxBytes,txBytes,rxRateandtxRatein bytes per second. The plugin skips loopback and virtual interfaces such asveth*,docker*,br-*andtun*. The first report has nonetworkfield, because a rate needs two samples.processesaggregates nginx, php-fpm, mysql/mariadb, postgres, redis and node processes fromps. Each entry hasname,count,cpuandmemin bytes. Thecpufigure isps%cpu, which is an average over each process's lifetime.loadavg,uptimein seconds, andaddresses, the first non-internal IPv4 address per interface.
When it alerts
The server's os case checks cpu > 90 and memory.usedPercent > 90 and would raise a warning for either. The plugin sends neither field, so in practice the os plugin never raises an alert.
Every os report still updates the system record. It writes os (platform, release, arch), ip_address, last_seen and status.
On the dashboard
The card is a bar card titled with the hostname, labelled OS · <platform>.
| Reading | How it is computed | Warn | Crit |
|---|---|---|---|
| CPU bar | 1 - idle / total summed over cpus[].times | above 70% | above 85% |
| Memory bar | (totalmem - available) / totalmem | above 78% | above 85% |
| DISK | fullest entry in disks | 80% or more | 90% or more |
| LOAD | 5-minute load average divided by core count | 1.0 per core | 2.0 per core |
| NET | rxRate + txRate | none | none |
| UPTIME | uptime in hours | none | none |
CPU, memory and disk pressure raise the card's color and status word. That is display only. It does not change the stored status and does not send a notification.
A host that has not reported for 300 seconds shows OFFLINE with the time since its last report.
Requirements
psanddfon the PATH.- Linux reads
/proc/meminfoand/proc/net/dev. macOS runsvm_statandnetstat -ibn. - No root access needed.
Gotchas
- On platforms other than Linux and macOS, network throughput is omitted rather than shown as zero.
- The CPU figure comes from cumulative
os.cpus()counters, which count from boot.