-
Notifications
You must be signed in to change notification settings - Fork 322
Description
Description
The jitsi_jibri_healthy Prometheus gauge always reads 0.0 on a freshly started Jibri instance, even though the instance is healthy.
The REST health endpoint correctly reports HEALTHY:
$ curl http://localhost:2222/jibri/api/v1.0/health
{"status":{"busyStatus":"IDLE","health":{"healthStatus":"HEALTHY","details":{}}}}
But the Prometheus metric stays at 0:
$ curl http://localhost:2222/metrics | grep jitsi_jibri_healthy
# TYPE jitsi_jibri_healthy gauge
# HELP jitsi_jibri_healthy Whether the jibri instance is currently healthy.
jitsi_jibri_healthy 0.0
Root cause
In JibriMetrics.kt, the healthy gauge is registered with a default value of 0.0. It only gets updated when updateStatus() is called:
fun updateStatus(status: JibriStatus) {
healthy.set(status.health.healthStatus == ComponentHealthStatus.HEALTHY)
recording.set(status.busyStatus == ComponentBusyStatus.BUSY)
}In JibriStatusManager.kt, publishStatus() is only called when a state transition occurs (old != new). Since Jibri starts healthy and no transition happens, the metric subscriber never receives the initial state, and the gauge remains at 0.
The XMPP presence does get the initial HEALTHY status (via updatePresence at startup), but the Prometheus metric does not.
Expected behavior
jitsi_jibri_healthy should report 1.0 when Jibri is healthy and idle.