11 min • read


Telepresence offers powerful monitoring capabilities to help you keep a close eye on your telepresence activities and traffic manager metrics.

Prometheus Integration

One of the key features of Telepresence is its seamless integration with Prometheus, which allows you to access real-time metrics and gain insights into your system's performance. With Prometheus, you can monitor various aspects of your traffic manager, including the number of active intercepts and users. Additionally, you can track consumption-related information, such as the number of intercepts used by your developers and how long they stayed connected.

To enable Prometheus metrics for your traffic manager, follow these steps:

  1. Configure Prometheus Port

    First, you'll need to specify the Prometheus port by setting a new environment variable called PROMETHEUS_PORT for your traffic manager. You can do this by running the following command:

  2. Validate the Prometheus Exposure

    After configuring the Prometheus port, you can validate its exposure by port-forwarding the port using Kubernetes:

  3. Access Prometheus Dashboard

    Once the port-forwarding is set up, you can access the Prometheus dashboard by navigating to http://localhost:9090 in your web browser:

    Here, you will find a wealth of built-in metrics, as well as custom metrics (see below) that we have added to enhance your tracking capabilities.

    agent_countGaugeNumber of connected traffic agents.
    client_countGaugeNumber of connected clients.
    active_intercept_countGaugeNumber of active intercepts.
    session_countGaugeNumber of sessions.
    tunnel_countGaugeNumber of tunnels.
    tunnel_ingress_bytesCounterNumber of bytes tunnelled from clients.
    tunnel_egress_bytesCounterNumber of bytes tunnelled to clients.
    active_http_request_countGaugeNumber of currently served HTTP requests.
    active_grpc_request_countGaugeNumber of currently served gRPC requests.
    connect_countCounterThe total number of connects by user.client, install_id
    connect_active_statusGaugeFlag to indicate when a connect is active. 1 for active, 0 for not active.client, install_id
    intercept_countCounterThe total number of intercepts by user.client, install_id, intercept_type
    intercept_active_statusGaugeFlag to indicate when an intercept is active. 1 for active, 0 for not active.client, install_id, workload
  4. Enable Scraping for Traffic Manager Metrics To ensure that these metrics are collected regularly by your Prometheus server and to maintain a historical record, it's essential to enable scraping. If you're using the default Prometheus configuration, you can achieve this by specifying specific pod annotations as follows:

    These annotations instruct Prometheus to scrape metrics from the Traffic Manager pod, allowing you to track consumption metrics and other important data over time.

Grafana Integration

Grafana plays a crucial role in enhancing Telepresence's monitoring capabilities. While the step-by-step instructions for Grafana integration are not included in this documentation, you have the option to explore the integration process. By doing so, you can create visually appealing and interactive dashboards that provide deeper insights into your telepresence activities and traffic manager metrics.

Moreover, we've developed a dedicated Grafana dashboard for your convenience. Below, you can find sample screenshots of the dashboard, and you can access the JSON model for configuration:

Sample Screenshots:

grafana dashboard

JSON Model:

This dashboard is designed to provide you with comprehensive monitoring and visualization tools to effectively manage your Telepresence environment.