Skip to content

Prometheus Metrics Catalog & PromQL Reference ​

RUSEON Core exposes standard Prometheus metrics at GET /metrics for ingestion by Prometheus, VictoriaMetrics, and Grafana.


1. Official Metrics Catalog Table ​

The following 12 metrics are defined in pkg/metrics/metrics.go:

Metric NameTypeLabelsDescription
ruseon_active_streamsGaugecamera_idNumber of currently active camera streams (1 = active, 0 = inactive)
ruseon_stream_reconnects_totalCountercamera_idTotal number of stream reconnection attempts
ruseon_frames_received_totalCountercamera_idTotal number of video frames received from camera
ruseon_key_frames_totalCountercamera_idTotal number of KeyFrames (I-frames) received
ruseon_network_receive_bytes_totalCountercamera_idTotal network payload bytes received from RTSP source
ruseon_disk_write_bytes_totalCountercamera_idTotal bytes written to persistent fMP4 disk storage
ruseon_archive_segments_written_totalCountercamera_idTotal completed hourly archive segments written
ruseon_archive_errors_totalCountercamera_idTotal archive write and filesystem errors
ruseon_ringbuffer_drops_totalCountercamera_idTotal video frames dropped due to buffer overflow
ruseon_eventbus_drops_totalCounter(none)Total events dropped due to full worker queues
ruseon_webrtc_peers_activeGaugecamera_idNumber of active WebRTC peer connections per stream
ruseon_hls_requests_totalCountercamera_idTotal HLS playlist and segment requests served

2. Essential PromQL Alert Queries ​

promql
# Alert: Camera Ingest Lost (Stream Offline)
ruseon_active_streams == 0

# Alert: Ingest Reconnect Flapping (> 5 reconnects in 5m)
increase(ruseon_stream_reconnects_total[5m]) > 5

# Alert: RingBuffer Frame Drops (Slow Consumer or Network Bottleneck)
rate(ruseon_ringbuffer_drops_total[5m]) > 0

# Alert: Disk Archive Write Failures
increase(ruseon_archive_errors_total[5m]) > 0

# Alert: High Ingress Bitrate (Mbps per camera)
rate(ruseon_network_receive_bytes_total[1m]) * 8 / 1000000

Released under the MIT License.