Jump to: navigation, search

Grafana Integration with TSDR Step-by-Step

Package Installation

  1. Install Apache Web Server.

    As an example, the following steps provides instructions for installing Apache Web Server on Ubuntu 12.04 LTS.

    sudo apt-get install apache2.

  2. Download Grafana 1.9.1 from Grafana website:http://grafana.org/download/

For example, if the environment is Ubuntu:

  1. Download the tar file from the above website.
  2. Untar the downloaded tar file into /opt/grafana directory.

    Note: make sure there's no embedded grafana-1.9.1/ under /opt/grafana.

  3. Make sure the following sections are present in /etc/apache2/apache2.conf
<Directory /opt/grafana/>
       Options Indexes FollowSymLinks
       AllowOverride None
       Require all granted


  1. Apache Web Server configuration <p> Change DocumentRoot in Apache Web Server configuration to pint to /opt/grafana.

    For example, if the environment is Ubuntu:

    Change the default file under /etc/apache2/sites-available/ to include the following entry under <VirtualHost:*80>

    DocumentRoot /opt/grafana

  2. Grafana Configuration

    Open config.sample.js under /opt/grafana

    Under datasources: {graphite: {, change url: http://<ODL_IP>:8181/tsdr/nbi and render_method: 'GET'

    The following is an example of the datasource section in the config.sample.js:

datasources: {        
       graphite: {
         type: 'graphite',
         url: "",
         render_method: 'GET'

Note: if the web browser is running on the same machine (or VM) as the ODL, you may use in the above configuration. Otherwise, please use the actual IP address of ODL controller.

Start Apache Web Server

For example, if the environment is Ubuntu, run the following command:
/etc/init.d/apache2 start

View the Default Grafana GUI Welcome Page

Open a web browser on your machine. Point the URL to You should see the Grafana Weblcome Page with a sample Chart as follows.

Grafana Welcome Page

Now, you can follow the Grafana documentation to customize the dashboard to include the diagrams or charts that you would like to view based on the collected and stored data from TSDR data store.

In the next few sections, we will walk you through the steps of creating a couple of example charts.

Create a sample TSDR Grafana Chart

In this section, we will guide you through how to create a simple TSDR Grafana chart. For more sophisticated creation of charts, please refer to Grafana documentation.

In the Grafana Welcome GUI page, click The Title of the sample blank graph, and then click edit to edit the graph.

Edit Graph

Then you will get into the Graph Edit page. Click General and then input the title of the graph. For example, "OpenFlow Port Statistics" as the title. Then, you can also click the time range of the graph. For example, last 1hr data. Also, you may change the auto refresh frequency, such as refresh every 10 seconds. Please follow the green arrows in the screenshot to achieve the above graph configurations.

Edit Graph

Now, you would need to change the metrics definition of this graph. TSDR uses a special TSDRKey for specifying the metrics. For example, if you would like to view the TransmittedPackets metrics on the port with ID openflow:1:2, you may specify the metric key as follows:


Click the Metrics tab on the graph as indicated as green arrow in the following screenshot. Type the above TSDR Metric Key into the Metrics field. Then you'll see the charts being plotted dynamically on the graph.

Edit Graph
Congratulations! You just created the first TSDR Grafana graph using TransmittedPackets metric collected in the TSDR data stores.