important-garden-60239
09/11/2025, 9:58 AMtall-airline-16756
09/11/2025, 9:58 AMtall-airline-16756
09/11/2025, 9:59 AMprometheus_port
(for example, 6789). This will make the metrics available at the /metrics
endpoint.
2. Configure Prometheus: Next, add a scrape job in your Prometheus configuration to point to the LiveKit server’s /metrics
endpoint. Here’s an example you can use:
scrape_configs:
- job_name: 'livekit'
static_configs:
- targets: ['<livekit-server-ip>:6789']
3. Monitor Metrics: Some important metrics to watch are room and participant counts, track stats, network performance, and system health. For instance, livekit_room_total
shows active rooms, and livekit_packet_loss_percent
helps you keep an eye on packet loss.
4. Visualize Data: Grafana is a great tool to create dashboards for metrics like room counts, network throughput, and overall system performance. Using PromQL queries, you can dig into specific insights that matter to you.
5. Optional AI Usage Tracking: If you’re interested in AI-related metrics, you can use the UsageCollector
class to gather data like LLM tokens or TTS characters. This info can be logged or exported manually as needed.
If you have any questions or want a hand with any of these steps, just let me know—I’m here to help!
Sources: Docs::Home | pkg/telemetry/prometheus/quality.go | webhook/stats.go | Logs, metrics, and telemetry | LiveKit Docs | agents/src/metrics/usage_collector.tstall-airline-16756
09/11/2025, 9:59 AMprometheus_port
(for example, 6789). This will make the metrics available at the /metrics
endpoint.
2. Configure Prometheus: Next, add a scrape job in your Prometheus server configuration to point to the LiveKit server’s /metrics
endpoint. Here’s an example configuration to guide you:
scrape_configs:
- job_name: 'livekit'
static_configs:
- targets: ['<livekit-server-ip>:6789']
3. Monitor Metrics: Some important metrics to keep an eye on include room and participant counts, track statistics, network performance, and system health. For instance, livekit_room_total
shows active rooms, and livekit_packet_loss_percent
helps you monitor packet loss.
4. Visualize Data: To make the data easier to understand, you can use Grafana to build dashboards for things like room counts, network throughput, and overall system performance. You can query these metrics directly with PromQL.
5. Optional AI Agent Metrics: If you’re interested in session-specific details like LLM tokens or TTS characters, the UsageCollector
class is a handy tool to aggregate those metrics. You can log or export this data manually as needed.
With this setup, you’ll have a thorough way to monitor LiveKit’s real-time usage and performance. If you have any questions or need further help, feel free to ask—I’m here to support you!