Skip to main content

Prometheus metrics

OmniBus can expose its own health and per-port status at a standard GET /metrics endpoint in Prometheus text exposition format. Point any Prometheus-compatible scraper (Prometheus itself, Grafana Agent, VictoriaMetrics, Zabbix, Datadog's OpenMetrics check, …) at the box and you get the appliance as a first-class monitored target — no per-metric setup.

It exposes the same canonical metric set as the MQTT and BACnet system publishers, plus per-port up/down state and cumulative traffic counters.

Enabling it

The endpoint is off by default — the export reveals port topology and the hostname, so it's opt-in. Turn it on any of these ways:

  • In the UI: System → Maintenance → Prometheus metrics — flip the switch (admin only). This is the usual way.
  • Environment variable: set OMNIBUS_METRICS=1 before the service starts (e.g. in the systemd unit). This forces the endpoint on regardless of the UI toggle, which then shows as pinned.
  • Config: set metrics.enabled to true in config.json.

When disabled the endpoint returns 404 so a scanner can't fingerprint the box. When enabled it is unauthenticated (the standard exporter convention for an internal-network appliance) — keep the management network trusted, or scrape it behind your own reverse proxy.

What's exported

MetricTypeDescription
omnibus_build_info{version}gaugeAlways 1; the version label carries the firmware version.
omnibus_uptime_hoursgaugeProcess uptime.
omnibus_cpu_loadgauge1-minute load average.
omnibus_cpu_temperature_celsiusgaugeSoC temperature (Pi only).
omnibus_memory_used_pctgaugeMemory used.
omnibus_disk_used_pctgaugeData-partition usage.
omnibus_ports_total / omnibus_ports_enabledgaugeConfigured / enabled port counts.
omnibus_ntp_synchronizedgauge1 when the clock is NTP-synced.
omnibus_throttlinggauge1 when the Pi reports under-voltage / thermal throttling.
omnibus_https_enabledgauge1 when serving over TLS.
omnibus_port_up{path,protocol,label}gauge1 when the port is enabled and connected.
omnibus_port_enabled / omnibus_port_connected / omnibus_port_device_presentgaugePer-port state, same labels.
omnibus_port_tcp_clients{path,protocol,label}gaugeTCP clients attached to the port's server.
omnibus_port_frames_total{path,channel,dir}counterFrames seen, by channel (serial/tcp/mqtt/event) and direction (rx/tx).
omnibus_port_bytes_total{path,channel,dir}counterBytes seen, same labels.
omnibus_mqtt_connected / omnibus_sparkplug_connectedgaugeUpstream transport state.
omnibus_bacnet_server_running / omnibus_modbus_server_runninggaugeObject-server state.

Example scrape config

scrape_configs:
- job_name: omnibus
static_configs:
- targets: ['omnibus.local:80'] # or :443 with scheme: https

The _total counters are monotonic across the lifetime of the process, so the usual rate(omnibus_port_frames_total[5m]) gives you live bus throughput, and an alert on omnibus_port_up == 0 (or absent()) catches a dropped port or a silent gateway.