Skip to content

Conversation

@Taukon
Copy link
Contributor

@Taukon Taukon commented Jul 7, 2025

This PR integrates rtcstats-server and rtc-visualizer into the docker-compose setup.

This PR is currently in Draft mode.
It depends on updated Docker images for jitsi/rtcstats-server and jitsi/rtc-visualizer that have not yet been published to the official Docker Hub registry. The current images on Docker Hub are older versions and will not work correctly with these changes.
I will mark this PR as "Ready for Review" as soon as the new images are available.

env.example Outdated
#RTCSTATS_ENABLED=true

# Send the console logs to the rtcstats server
#RTCSTATS_STORE_LOGS=false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this file, RTCSTATS_ENABLED and RTCSTATS_SEND_SDP are both set "true" so when you uncomment them they will be turned on. But RTCSTATS_STORE_LOGS is "false" so if you uncomment it, it won't change anything. I think that this is because you are showing common defaults but the inconsistency seems a little strange to me because the rest of this example file seems to show how to turn things on.

@@ -0,0 +1,3 @@
{
"admin": "admin"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be better to have this something like "admin": "CHANGE_ME" to make it obvious to someone that they need to set the password to something other than admin here.

@Taukon
Copy link
Contributor Author

Taukon commented Aug 27, 2025

I've added a new Grafana dashboard for rtcstats-server prometheus metrics.
Here is a screenshot:
grafana-rtcstats-dashboard

@Taukon Taukon marked this pull request as ready for review August 27, 2025 15:45
@saghul
Copy link
Member

saghul commented Aug 27, 2025

I've added a new Grafana dashboard for rtcstats-server prometheus metrics.

This is fantastic!

networks:
meet.jitsi:
aliases:
- localhost.localstack.cloud

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are these complex aliases needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've confirmed this also works using the simpler service name localstack, so I will update the configuration to use that method instead.

- ./rtcstats/.env
environment:
# LocalStack configuration: https://docs.localstack.cloud/references/configuration/
- SERVICES=lambda,iam,logs,s3,dynamodb,firehose

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are lambda, firehose, iam and logs needed here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, we only use S3 and DynamoDB in this setup. The other services like lambda, firehose, iam, and logs are unnecessary. I will remove them.

- AWS_ENDPOINT_URL=http://localhost.localstack.cloud:4566
volumes:
- "./rtcstats/localstack/${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this part here do?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ./rtcstats/localstack/volume mount was intended for data persistence, but it doesn't seem to be functioning correctly for S3, so I will remove it. The /var/run/docker.sock mount is for services like Lambda. It is not needed here and I will remove that as well.


From your `docker-jitsi-meet` directory, run the following command to start all services, including Jitsi Meet, rtcstats, and Localstack.
```shell
docker compose -f docker-compose.yml -f rtcstats.yml -f ./rtcstats/localstack/localstack.yml up -d

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried running this on a clean setup, it's partially working, except for s3 bucket initialization.
Seems like the rtcstats-server-setup part fails for some reason.
Getting this:
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The S3 endpoint is misconfigured. It needs to be http://s3.localhost.localstack.cloud:4566 (with the s3. prefix) so the AWS SDK can make virtual-hosted-style requests. The unknownEndpoint error occurs without it. I'm sorry for leaving this out of the README. The .env file needs these values:

RTCSTATS_S3_ENDPOINT=http://s3.localhost.localstack.cloud:4566
RTCSTATS_DYNAMODB_ENDPOINT=http://localhost.localstack.cloud:4566

I'll commit the documentation fix soon.

@Taukon
Copy link
Contributor Author

Taukon commented Sep 2, 2025

I simplified the localstack.yml file by removing unnecessary settings and also updated the readme to make the setup instructions clearer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants