Skip to content

Prometheus Metrics ​

GET /metrics answers in the Prometheus text exposition format, read from the database at scrape time. Kuroshiro keeps no history of its own, so point an external Prometheus at it for charts and long-term retention (ADR-0026).

MetricLabelsWhat it is
kuroshiro_device_battery_voltsdevice, friendly_idLast reported battery voltage
kuroshiro_device_rssi_dbmdevice, friendly_idLast reported Wi-Fi signal strength
kuroshiro_device_last_seen_timestamp_secondsdevice, friendly_idWhen the Device last polled, as a Unix timestamp
kuroshiro_alerts_activekindActive Alerts per kind, zeros included
kuroshiro_device_sensor_carbon_dioxide_ppmdevice, friendly_idLast CO₂ Sensor reading
kuroshiro_device_sensor_humidity_percentdevice, friendly_idLast humidity Sensor reading
kuroshiro_device_sensor_pressure_hpadevice, friendly_idLast pressure Sensor reading
kuroshiro_device_sensor_temperature_celsiusdevice, friendly_idLast temperature Sensor reading
kuroshiro_data_source_fetch_failure_streakplugin, plugin_id, data_sourceConsecutive failed scheduled fetches of a fetch-mode Data Source

All of them are gauges. The MAC address is never used as a label.

WARNING

Like the routes a Device calls, /metrics sits outside the /api prefix and has no authentication of its own. If you want it private, keep it off your reverse proxy.

yaml
scrape_configs:
  - job_name: kuroshiro
    static_configs:
      - targets: ['kuroshiro.local:3000']

Released under the MIT License.