Configuring Grafana for application network traffic

To view the application network traffic metrics for your gateways in Grafana, you must first install and configure it. After you install Grafana, you configure your Grafana dashboard and data source.

Prerequisites

Configuring Grafana on Linux®

Complete the following steps:

  1. Configure the following environment variables for Grafana: MDM_API_KEY and MDM_SERVICE_URL.

    MDM_API_KEY is used to authenticate the tenant in the data source. The API key is needed for any user that needs read access to all the Mesh resources. To generate your API key, see Creating API keys by using the Mesh console.

  2. On Linux, Grafana uses a specific EnvironmentFile, which is set to /etc/sysconfig/grafana-server. Add the environment variables to this file. Use the following example settings as a guide:
    MDM_API_KEY=xxxxxxxxxxxxxx
    MDM_SERVICE_URL=https://app.hybridcloudmesh.ibm.com/api/v1/metrics
  3. Provision Grafana with a data source and a dashboard. Put the following configuration files in the specified directories:
  4. To create a dashboard for Red Hat® Service Interconnect® gateways, put the Service Interconnect edge dashboard configuration file in /var/lib/grafana/dashboards/.
  5. Restart the Grafana instance.

Configuring Grafana in Docker

Complete the following steps:

  1. Export the following variables to the Docker container and include the configurations in the Grafana configuration for the container:
    MDM_API_KEY=xxxxxxxxxxxxxx
    MDM_SERVICE_URL=https://app.hybridcloudmesh.ibm.com/api/v1/metrics

    For information about mounting volumes, see Start a service with volumes. For information about passing environment variables to containers, see Explore ways to set environment variables.

  2. Provision Grafana with a data source and a dashboard. Use volume mounting to include the following configuration files in the container's Grafana configuration:
  3. To create a dashboard for Red Hat Service Interconnect gateways, use volume mounting to include the Service Interconnect edge dashboard configuration file in the container's Grafana configuration in /var/lib/grafana/dashboards/.
  4. Restart the Grafana instance.