Connect a host-metrics device

Updated

The synacl-gateway reference gateway ships with a Host metrics driver: it reads the machine it runs on and publishes the numbers as a device, so a Raspberry Pi, a server or an industrial PC shows up next to your sensors — with history, dashboards, rules and uptime monitors like any other device.

Requires a software gateway running synacl-gateway, already online. The app only offers the Host metrics protocol once the gateway has connected and reported that it supports it, so start the gateway first.

See what your machine can provide

Before adding the device, run this on the machine:

synacl-gateway metrics

It prints one row per metric with the value it would publish right now, or the reason that metric is unavailable on this machine. --watch 5 samples again every five seconds, which is the easiest way to see the CPU load and network rates settle.

Add the device

  1. Open Devices → Add device, choose Host metrics (under Software gateway) and pick the gateway.
  2. Set the sample interval. Once a minute is plenty for a server; your plan's minimum interval applies as for any device.
  3. Add one tag per value you want and set its Metric — which measurement of the host it carries. Pick from the list or type the key.
Metric Unit What it reads
cpu.temp °C CPU temperature, where the OS exposes a sensor. A Raspberry Pi does; many laptops and virtual machines do not
cpu.load % CPU utilisation since the previous sample
load.1m — 1-minute load average (Linux and macOS; not reported on Windows)
mem.used_pct % Memory in use: (total − available) ÷ total
disk.used_pct % Space used on the root filesystem (/, or C: on Windows). In Docker it reports the /data volume
uptime_s s Whole seconds since the host booted
net.rx_bps bit/s Receive rate on the default network interface
net.tx_bps bit/s Transmit rate on the default network interface

A metric key is lowercase letters, digits, _ and .; the gateway receives it in the tag's metric field of its configuration and reads that measurement each sample. A tag whose metric the gateway does not know is left out, and the gateway log names the metrics it does know.

Missing values are left out — never sent as 0

A metric the machine cannot provide is simply omitted from the reading: no temperature sensor, the load average on Windows, or the very first network sample (a rate needs two samples, so net.rx_bps and net.tx_bps appear from the second read). The gateway logs why, once. It never publishes 0 in its place — a zero would chart as a real reading and could trip a rule. So an empty cpu.temp chart on a laptop or a VM is expected, not a fault; synacl-gateway metrics shows what the host offers.

Notes