There is a need to differentiate statistics from Jitsi depending on the entity using our service. E.g
Customer A - x audio calls, x conferences, x concurrent users, x jitter, etc etc
Customer B - x audio calls, x conferences, x concurrent users, x jitter, etc etc
Customer C - …
We are currently using the metrics/statistics coming out of our Kubernetes cluster but they are for all users in that namespace/cluster. Is there a way to differentiate?
You can use tenants for different customers and make sure the stats coming from the cluster are tagged with the tenant (not sure what is used there for sending these stats).
Tenants as Jitsi Meet and Jitsi Meet …
How do you recognize Customer A and Customer B on your side.
We have created the tenants thing in jitsi-meet for this purpose.
Is there any documentation on how to use tenants where I can read more about this? I guess the follow up question is how the statistics are separated in this regard. How to differentiate between customer A and customer B
we will be using jwt auth for our customers, maybe this could be a way to differentiate which tenant they can use? Does the jwt hold this info today?
Yep, you can restrict access based on tenants.
Tenants are enabled by default when using jitsi-meet debian package. Not sure about docker, I think we turned it on by default at some point …
This what you see there is callstats. This is their thing and I’m not sure how they do it, but I think it is based on a siteId we pass in the client - which is the tenant.
The plugin does not really impose any requirements on the API endpoint. As long as the API is reachable and accepts requests for the required paths, and that it responds in a timely fashion, it’s all good.
Off the top of my head, here are a few things to consider:
Endpoint auth – if your API endpoint is publicly accessible, then you’ll want to protect it with some form of auth so that a malicious actor cannot flood you with junk data. If you happen to use a header-based auth, then you can use the api_headers options and not have to modify the module.
Domain resolution – when specifying the URL of your API, make sure the hostname is resolvable via DNS server and not reliant on /etc/hosts. The underlying net.http lua module used for resolving IP address does not use take into account /etc/hosts [1].
Debugging and initial dev – before building your endpoint, you could first configure event_sync to post to something like webhook.site. That way, you can first confirm that the module is working and you can inspect the payload and endpoints being called.
To do this, visit https://webhook.site and you’ll get a unique URL e.g. https://webhook.site/<SOME_UUID>. You can then configure event_sync with:
api_prefix = "https://webhook.site/<SOME_UUID>"
IIRC, tenant-based rooms (e.g. client123/room123) would be represented in room_name payload as [client123]room123. So your API backend should be able to easily parse it and store the data accordingly.
Do have a play and double check. Also take into account how case is handled for room name and tenant. I suspect everything might be represented as lower case since it is extracted for room JID.
So if someone visits https://meet.yourdomain.com/CustomerX/MyRoom it might show up as [customerx]myroom. Maybe.