Skip to content

Commit 2bce7f6

Browse files
committed
fix: Initialize Prometheus healthy/recording metrics with current status
The `jitsi_jibri_healthy` and `jitsi_jibri_recording` Prometheus gauges default to 0 and only update on status transitions via publishStatus(). Since Jibri starts healthy with no transition, the metrics remain at 0 even though the instance is healthy. Seed the metrics with the current status immediately after registering the status handler so they reflect the actual state from startup. Fixes #590
1 parent 5522961 commit 2bce7f6

File tree

1 file changed

+1
-0
lines changed
  • src/main/kotlin/org/jitsi/jibri

1 file changed

+1
-0
lines changed

src/main/kotlin/org/jitsi/jibri/Main.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ fun main(args: Array<String>) {
8181
jibriStatusManager.addStatusHandler {
8282
jibriManager.jibriMetrics.updateStatus(it)
8383
}
84+
jibriManager.jibriMetrics.updateStatus(jibriStatusManager.overallStatus)
8485
webhookSubscribers.forEach(webhookClient::addSubscriber)
8586
val statusUpdaterTask = TaskPools.recurringTasksPool.scheduleAtFixedRate(
8687
1,

0 commit comments

Comments
 (0)