How I query available jibri instance on jitsi?

I’m developing auto-provisioning of Jibir instance docker-based, my idea is to check on jitsi server how many instance are connected to jtisi and available, besed on this I’ll auto start/stop jibir instance.
the goal is to save the resources instead of keeping resources are runinnig.

On jitsi server

apt-get install curl jq

curl -s | jq '.jibri_detector'
curl -s | jq '.jibri_detector.count'
curl -s | jq '.jibri_detector.available'

Thanks a lot @emrah for you answer, it’s very useful and work fine.

1 Like

Hi, there is a way to know which jibri instance (which container id or name) are available?
I need to match available or used Jibri instance to its container id, so I can kill the right unused container.

I used scaling option to create the Jibri containers .

#sudo docker-compose -f jibri.yml up -d --scale jibri=N

N is the total number of Jibri Container to be runinning so :

if N > M (the current total number), the docker compose will create new N-M Jibri containers
if N<M the docker compose will kill M-N Jibri container, and It will kill the M-N last containers

the commande above will create the Jibri container as below:

srv@docker:~/docker-jibri-yz/jibri_zmeet$ sudo docker-compose -f jibri.yml up -d --scale jibri=5
Creating jibri_zmeet_jibri_2 … done
Creating jibri_zmeet_jibri_3 … done
Creating jibri_zmeet_jibri_4 … done
Creating jibri_zmeet_jibri_5 … done

but if you want to reduce total number of Jibri 1 by, keeping only 4 instances you will run this commande:

srv@docker:~/docker-jibri-yz/jibri_zmeet$ sudo docker-compose -f jibri.yml up -d --scale jibri=4
Stopping and removing jibri_zmeet_jibri_5 … done.

the problem you can’t know if the stopped Jibiri is using by Jitis or not!


Use the finalize script to close the jibri instance then the jibri instance will be closed after finishing the recording.

I don’t know the Docker side but it’s not a good way to fix the instance number. You should start a new instance when neeeded but don’t scale down on the Docker side.

Can the container close itself from finalize script?

kill 1 should stop it

1 Like