docs/main/administration-guide/configure/calls-metrics-monitoring.mdx
This guide provides detailed information on monitoring Mattermost Calls performance and health through metrics and observability tools. Effective monitoring is essential for maintaining optimal call quality and quickly addressing any issues that arise.
Mattermost Calls provides metrics through Prometheus for both the Calls plugin and the RTCD service. These metrics help track:
The metrics are exposed through HTTP endpoints:
/plugins/com.mattermost.calls/metrics/metrics (default) or a configured endpointResource utilization metrics (CPU, memory, network) are mainly provided by an external service (node-exporter).
Metrics for the calls plugin are exposed through the
/plugins/com.mattermost.calls/metricssubpath under the existing Mattermost server metrics endpoint. This is controlled by the Listen address for performance configuration setting. It defaults to port 8067. For example:http://localhost:8067/plugins/com.mattermost.calls/metricsThe RTCD Service/metricsendpoint is exposed on the HTTP API (e.g.http://localhost:8045/metrics).
For instructions on deploying Prometheus and Grafana for Mattermost, please refer to the Deploy Prometheus and Grafana for Performance Monitoring guide.
Once Prometheus and Grafana are set up, you will need to configure Prometheus to scrape metrics from the Calls-related services.
Add the following jobs to your prometheus.yml configuration:
scrape_configs:
- job_name: 'calls-plugin'
metrics_path: /plugins/com.mattermost.calls/metrics
static_configs:
- targets: ['MATTERMOST_SERVER_IP:8067']
labels:
service_name: 'calls-plugin'
- job_name: 'rtcd'
metrics_path: /metrics
static_configs:
- targets: ['RTCD_SERVER_IP:8045']
labels:
service_name: 'rtcd'
- job_name: 'rtcd-node-exporter'
metrics_path: /metrics
static_configs:
- targets: ['RTCD_SERVER_IP:9100']
labels:
service_name: 'rtcd'
- job_name: 'calls-offloader-node-exporter'
metrics_path: /metrics
static_configs:
- targets: ['CALLS_OFFLOADER_SERVER_IP:9100']
labels:
service_name: 'offloader'
Replace the placeholder IP addresses with your actual server addresses:
MATTERMOST_SERVER_IP: IP address of your Mattermost serverRTCD_SERVER_IP: IP address of your RTCD serverCALLS_OFFLOADER_SERVER_IP: IP address of your calls-offloader server (if deployed)Metrics Configuration Notice: Use the service_name labels as shown in the configuration above. These labels help organize metrics in dashboards and enable proper service identification.
You can use the official Mattermost Calls Performance Monitoring dashboard to visualize these metrics.
23225.These metrics help monitor the health and resource usage of the RTCD process:
rtcd_process_cpu_seconds_total: Total CPU time spentrtcd_process_open_fds: Number of open file descriptorsrtcd_process_max_fds: Maximum number of file descriptorsrtcd_process_resident_memory_bytes: Memory usage in bytesrtcd_process_virtual_memory_bytes: Virtual memory usedThese metrics track the WebRTC connections and media flow:
rtcd_rtc_conn_states_total{state="X"}: Count of connections in different statesrtcd_rtc_errors_total{type="X"}: Count of RTC errors by typertcd_rtc_rtp_tracks_total{direction="X"}: Count of RTP tracks (incoming/outgoing)rtcd_rtc_sessions_total: Total number of active RTC sessionsThese metrics track the signaling channel:
rtcd_ws_connections_total: Total number of active WebSocket connections. This is about RTCD <-> MM, so the connection count should match the number of MM nodes.rtcd_ws_messages_total{direction="X"}: Count of WebSocket messages (sent/received)Similar metrics are available for the Calls plugin with the following prefixes:
mattermost_plugin_calls_process_*mattermost_plugin_calls_rtc_*mattermost_plugin_calls_websocket_*mattermost_plugin_calls_store_ops_totalThe following performance benchmarks provide baseline metrics for RTCD deployments under various load conditions and configurations.
Deployment specifications
App specifications
Media specifications
Results
Below are the detailed benchmarks based on internal performance testing:
<table border="1" class="network-requirements"> <thead> <tr> <th>Calls</th> <th>Participants/call</th> <th>Unmuted/call</th> <th>Screen sharing</th> <th>CPU (avg)</th> <th>Memory (avg)</th> <th>Bandwidth (in/out)</th> <th>Instance type (RTCD)</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>1000</td> <td>2</td> <td>no</td> <td>47%</td> <td>1.46GB</td> <td>1Mbps / 194Mbps</td> <td>c7i.xlarge</td> </tr> <tr> <td>1</td> <td>800</td> <td>1</td> <td>yes</td> <td>64%</td> <td>1.43GB</td> <td>2.7Mbps / 1.36Gbps</td> <td>c7i.xlarge</td> </tr> <tr> <td>1</td> <td>1000</td> <td>1</td> <td>yes</td> <td>79%</td> <td>1.54GB</td> <td>2.9Mbps / 1.68Gbps</td> <td>c7i.xlarge</td> </tr> <tr> <td>10</td> <td>100</td> <td>1</td> <td>yes</td> <td>74%</td> <td>1.56GB</td> <td>18.2Mbps / 1.68Gbps</td> <td>c7i.xlarge</td> </tr> <tr> <td>100</td> <td>10</td> <td>2</td> <td>no</td> <td>49%</td> <td>1.46GB</td> <td>18.7Mbps / 175Mbps</td> <td>c7i.xlarge</td> </tr> <tr> <td>100</td> <td>10</td> <td>1</td> <td>yes</td> <td>84%</td> <td>1.73GB</td> <td>171Mbps / 1.53Gbps</td> <td>c7i.xlarge</td> </tr> <tr> <td>1</td> <td>1000</td> <td>2</td> <td>no</td> <td>20%</td> <td>1.44GB</td> <td>1.4Mbps / 194Mbps</td> <td>c7i.2xlarge</td> </tr> <tr> <td>1</td> <td>1000</td> <td>2</td> <td>yes</td> <td>49%</td> <td>1.53GB</td> <td>3.6Mbps / 1.79Gbps</td> <td>c7i.2xlarge</td> </tr> <tr> <td>2</td> <td>1000</td> <td>1</td> <td>yes</td> <td>73%</td> <td>2.38GB</td> <td>5.7Mbps / 3.06Gbps</td> <td>c7i.2xlarge</td> </tr> <tr> <td>100</td> <td>10</td> <td>2</td> <td>yes</td> <td>60%</td> <td>1.74GB</td> <td>181Mbps / 1.62Gbps</td> <td>c7i.2xlarge</td> </tr> <tr> <td>150</td> <td>10</td> <td>1</td> <td>yes</td> <td>72%</td> <td>2.26GB</td> <td>257Mbps / 2.30Gbps</td> <td>c7i.2xlarge</td> </tr> <tr> <td>150</td> <td>10</td> <td>2</td> <td>yes</td> <td>79%</td> <td>2.34GB</td> <td>271Mbps / 2.41Gbps</td> <td>c7i.2xlarge</td> </tr> <tr> <td>250</td> <td>10</td> <td>2</td> <td>no</td> <td>58%</td> <td>2.66GB</td> <td>47Mbps / 439Mbps</td> <td>c7i.2xlarge</td> </tr> <tr> <td>1000</td> <td>2</td> <td>2</td> <td>no</td> <td>78%</td> <td>2.31GB</td> <td>178Mbps / 195Mbps</td> <td>c7i.2xlarge</td> </tr> <tr> <td>2</td> <td>1000</td> <td>2</td> <td>yes</td> <td>41%</td> <td>2.6GB</td> <td>7.23Mbps / 3.60Gbps</td> <td>c7i.4xlarge</td> </tr> <tr> <td>3</td> <td>1000</td> <td>2</td> <td>yes</td> <td>63%</td> <td>3.53GB</td> <td>10.9Mbps / 5.38Gbps</td> <td>c7i.4xlarge</td> </tr> <tr> <td>4</td> <td>1000</td> <td>2</td> <td>yes</td> <td>83%</td> <td>4.40GB</td> <td>14.5Mbps / 7.17Gbps</td> <td>c7i.4xlarge</td> </tr> <tr> <td>250</td> <td>10</td> <td>2</td> <td>yes</td> <td>79%</td> <td>3.49GB</td> <td>431Mbps / 3.73Gbps</td> <td>c7i.4xlarge</td> </tr> <tr> <td>500</td> <td>2</td> <td>2</td> <td>yes</td> <td>71%</td> <td>2.54GB</td> <td>896Mbps / 919Mbps</td> <td>c7i.4xlarge</td> </tr> </tbody> </table>To verify that Prometheus is successfully collecting RTCD metrics, use this command:
curl http://PROMETHEUS_IP:9090/api/v1/label/__name__/values | jq '.' | grep rtcd
This command queries Prometheus for all available metric names and filters for RTCD-related metrics.
If no RTCD metrics appear, check:
To verify all Calls-related services are being scraped successfully:
http://PROMETHEUS_IP:9090)Each target should show status "UP" in green. If a target shows "DOWN" or errors:
Note: Configure Prometheus storage accordingly to balance disk usage with retention needs. If you need to be tight on storage, you can use a short retention period. If you have lots of storage you can keep the retention length longer.