Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Integrate Grafana with Routing Director for Telemetry Data Visualization

Routing Director stores telemetry data in VictoriaMetrics, a high-performance, open-source time series database designed to efficiently handle large volumes of time series data.

Routing Director has built-in telemetry views, but it also provides you the flexibility to integrate third-party applications like Grafana for advanced visualization and analysis of the telemetry data. Grafana is an open-source visualization tool that lets you create dashboards, charts, and graphs to monitor device status and analyze data. Grafana provides greater flexibility for customizing dashboards and visualizations compared to Routing Director's built-in views. Grafana also allows you to combine metrics collected over different time intervals into a single graph, making it easier to analyze trends and monitor device performance. Additionally, you can query the telemetry data and view the results directly on the Grafana GUI.

You can integrate Grafana securely with Routing Director through standard REST APIs present in Routing Director. The Prometheus data source plugin in Grafana uses a pre-shared REST API token that is shared with Routing Director. Routing Director authenticates the REST API token and establishes a secure connection with Grafana. After successful authentication, VictoriaMetrics exposes the telemetry data through a Prometheus-compatible API. Grafana retrieves the telemetry data using PromQL queries, and displays the rendered results as dashboards and visualizations.

Grafana is installed and managed as an external application and does not share the same deployment environment as Routing Director. To ensure secure access, the Routing Director APIs used for Grafana integration should be configured with a read-only access. This configuration restricts Grafana to retrieving telemetry data and prevents modification of Routing Director configurations. Additionally, Routing Director applies resource limits to PromQL queries to prevent excessive query execution that could impact Routing Director operations and system performance.

Note: Routing Director supports the following Grafana API endpoints once the integration is complete:
  • /api/v1/query
  • /api/v1/query_range
  • /api/v1/series
  • /api/v1/labels
  • /api/v1/label/<name>/values
  • /api/v1/metadata
  • /api/v1/status/buildinfo

For more information about these Prometheus APIs, see Prometheus documentation.

Prerequisites:

  • You must have Routing Director installed and configured. For information on installing Routing Director, see Routing Director Installation Guide.

  • You must have an external Grafana setup. For more information, see Set up Grafana.

The following procedure lists the steps to integrate Grafana with Routing Director:

  1. Generate Authentication token from the Routing Director GUI.
    1. Log in to the Routing Director GUI.
    2. Click Settings Menu > System Settings.
      The Organization Settings page appears.
    3. Click the Copy button next to the Organization ID field to copy the Organization ID.
    4. Generate the API token as described in Add an API Token.

      Click the Copy button next to the Key field to copy the generated API token.

      Note:
      • Since the API token is only visible at the time of generation, make a note of the API token as soon as it is generated.

      • The basic role recommended for integration is the Observer role, because it offers essential read-only access with minimal privileges. The network administrator and superuser roles can also be used, though they provide permissions beyond what is necessary.

      • The generated API token is unique to the respective organization ID and selected role.

  2. Configure Data Source in Grafana.
    1. Log in to the external Grafana application UI. For more information, see Sign in to Grafana.
    2. Click Connections > Data sources on the left navigation menu.
    3. Click Add new data source.
    4. Select Prometheus as the data source type.
      Note: Prometheus is the only supported data source type for the integration.
    5. Enter a name for the data source.
    6. Enter the Prometheus server URL.

      The format for the URL is https://<routing-director-ui-ip>/insights/api/v1/orgs/org_id/tsdb/prometheus.

      org_id is the organization ID that you copied from the Organization Settings page (Settings Menu > System Settings).

    7. Select the required security option from the TLS Settings menu.
      If Routing Director is installed with self generated certificates, then select the Skip TLS certificate validation option.
    8. Define the Header and Value fields in the HTTP headers menu.
      1. Define the Header field as Authorization.

      2. Define the Value field in the format: Token <generated_api_token>. Paste the copied API token here.

      Note:
      • The API token must belong to the organization associated with the organization ID you provided. The API token and organization ID are uniquely linked and cannot be used interchangeably with those of another organization. If the API token does not belong to the specified organization ID, authentication will fail and a connection cannot be established.

      • Ensure that you include a space between Token and the generated API token value.

    9. Select the required HTTP method from the HTTP method drop-down menu. The selection is done based on the generated API token and respective role selected in Routing Director.

      Select the GET HTTP method for the Observer role.

    10. Click the Save & test button to save and validate the connection.

      A confirmation message appears stating that the Prometheus API has been successfully queried.

      The external Grafana instance is now successfully integrated with Routing Director.

  3. Access the Grafana GUI and View Dashboards.

    You use dashboards to monitor the status and health of devices. Use the following steps to create new dashboards or to view existing dashboards from the Grafana GUI:

    1. Click (+) > Create > Dashboards > Add Panel on the main menu to create a dashboard.
    2. Click Dashboards > Home to view the existing dashboards. For more information, see Dashboards.
      Note:
      • Avoid adding too many charts to a dashboard, as excessive processing and data retrieval can elevate system resource usage.

      • Set the dashboard refresh rate to minutes rather than seconds for optimal performance. A low dashboard refresh rate can exhaust the API limit, causing data access failures.

    Apart from developing dashboards, you can also use the retrieved data for the following:

    • Data exploration—Query, collect, and analyze telemetry data for detailed, real-time analysis. For more information, see Explore.

    • Data joining—Merge the telemetry data from multiple sources into a single table, to consolidate data from different queries. For more information, see Transform data.