Kota Nakagawa 5e297f3879
feat(rtcstats): add rtcstats support (#2116)
* feat(rtcstats): add rtcstats support

* chore(rtcstats): update users.json to use placeholder password

* chore(rtcstats): update RTCSTATS_STORE_LOGS in env.example

* chore(rtcstats): add expose ports

* feat(rtcstats): add mongodb support

* docs(rtcstats): add readme for mongodb integration

* chore(rtcstats): fix readme

* feat(rtcstats): add grafana dashboard for prometheus metrics

* chore(rtcstats): update readme

* chore(rtcstats): fix readme

* chore(rtcstats): add troubleshooting to localstack readme

* fix(rtcstats): improve accuracy of dashboard graphs

* fix(rtcstats): fix typo in dashboard display name

* fix(rtcstats): simplify and clean up localstack configuration

* docs(rtcstats): improve localstack readme

---------

Co-authored-by: Andrei Gavrilescu <51706180+andrei-gavrilescu@users.noreply.github.com>
2026-03-16 23:34:22 +02:00
..

Meeting stats with rtcstats

Overview

This project demonstrates how to use rtcstats with Jitsi Meet to gather detailed information about meeting quality and logs.

Getting Started

Setup

  1. Update Jitsi Meet Docker Compose Configuration

    Edit .env in your docker-jitsi-meet directory to enable rtcstats.

    #
    # rtcstats integration
    #
    
    # Enable rtcstats analytics (uncomment to enable)
    RTCSTATS_ENABLED=true
    
    # Send the console logs to the rtcstats server
    RTCSTATS_STORE_LOGS=false
    
    # The interval at which rtcstats will poll getStats, defaults to 10000ms.
    RTCSTATS_POLL_INTERVAL=10000
    
    # Send the SDP to the rtcstats server
    RTCSTATS_SEND_SDP=true
    
    
  2. Configure rtcstats

    Copy the example environment files and edit them according to your environment.

    docker-jitsi-meet/rtcstats$ cp env.example .env
    docker-jitsi-meet/rtcstats$ cp ./rtcstats-server/env.example ./rtcstats-server/.env
    docker-jitsi-meet/rtcstats$ cp ./rtc-visualizer/env.example ./rtc-visualizer/.env
    

    Next, edit rtc-visualizer/.data/users.json to add your users. The default credential is admin:CHANGE_ME.

    {
    	"Alice": "XXX",
    	"Bob": "YYY"
    }
    
  3. Run Docker Compose

    From your docker-jitsi-meet directory, run the following command to start all services.

    docker compose -f docker-compose.yml -f rtcstats.yml up -d
    

Usage

  1. View RTC Visualizer

    Open https://localhost:8443/rtc-visualizer (or PUBLIC_URL/rtc-visualizer) in your browser.

Monitoring with Prometheus

  1. Update Prometheus Configuration

    Add the rtcstats-server endpoint to prometheus/prometheus.yml.

    scrape_configs:
      - job_name: "prometheus"
      # ... other configurations
      static_configs:
        - targets: ["...","rtcstats-server:8095"]
    
  2. Run Docker Compose

    Restart your environment with the prometheus.yml and grafana.yml files to launch the monitoring services.

    docker compose -f docker-compose.yml -f rtcstats.yml -f prometheus.yml -f grafana.yml up -d