Skip to content

Getting Started

Dillon Buchanan edited this page Mar 14, 2017 · 2 revisions

1. Install Grafana

Instructions for installing Grafana can be found here for a multiple of Linux distributions:http://docs.grafana.org/installation/.

As an example, the following will install Grafana on a RPM-based Linux:

sudo yum install https://grafanarel.s3.amazonaws.com/builds/grafana-4.1.2-1486989747.x86_64.rpm

Note: This simply installs the application but does not start or add it to your init.d.

2. Install the 128T-Datasource Plugin

The first thing we'll need to do is locate where Grafana has placed the plugin directory. In a typical Linux distribution the plugin path will be /var/lib/grafana/plugins (if you just installed it should be empty.) If that directory does not exist then you can always check the configuration file located at /etc/grafana/grafana.ini.

After we've determined the plugin directory we can download the 128T Plugin. The release page on GitHub contains a 128T-datasource.tar.gz download which we are interested in - choose the latest possible.

# Download Into TMP
curl -L -o /tmp/128T-datasource.tar.gz https://github.com/128technology/grafana-datasource/releases/download/v0.2/128T-datasource.tar.gz

# Create the 128T plugin directory
sudo mkdir /var/lib/grafana/plugins/128T-datasource

# Extract the tar into the directory
sudo tar -xvf /tmp/128T-datasource.tar.gz -C /var/lib/grafana/plugins/128T-datasource

3. Start Grafana

As part of the installation directions on Grafana's site there is a section about starting Grafana. For example, starting the service in a RPM-based Linux can be found here.

If all goes accordingly, Grafana will start up, load the plugin, and begin listening on port 3000 on the local interface. You can alter this by editing the configuration.

4. Login to Grafana

Navigate to Grafana in your web browser. It should ask you to login. The default username is admin and the default password is admin. Once you login, it should land you on the Dashboard. Make sure the 128T datasource is listed on the right under Installed Datasources. If the datasource is present then grab yourself a beer - you're almost there.

5. Initialize a 128T Datasource

We're going need a 128T product from here on out. In the top left corner of Grafana, click the icon which should drop down a menu. Select Data Sources. Once on the datasource page, in the upper right corner, select Add data source.

Once you've landed on the Add data source page, select 128T from the Type dropdown list. Choose a name for your data source and select Default if you want it to be selected by default when you create graphs. Under details, insert the URL for the given 128T product you wish to query: e.g. https://10.0.1.49. Choose proxy for Access.

Finally, for Token we'll need to grab a REST token from the 128T product you are attempting to query. To do this the easy way, simply go to the swagger page of your 182T product (e.g. https://10.0.1.49/explore), find the Authenticate section and the login portion below it. Execute a request with your username and password which will return you a token that you can insert directly into the Token field in Grafana.

Once your done, hit Add then Save & Test. This will test the connectivity between Grafana and the 128T product. If all goes well then you will see a green success message. You've now successfully added a 128T datasource.

Before you leave this page continue to the next step!

6. Importing a Pre-made Dashboard

To get you up and running quickly, a pre-made dashboard has already been created that can be imported into your Grafana. If you're still on the Edit data source page from step 5 then right below the title you should see a tab called Dashboards: click it. After the view switches, you should see a Import button on the right side in the row titled Starter Dashboard: click that button. Once you see the success message you can then click on the Starter Dashboard text (on the left) and be immediately taken to the dashboard.

Once you've entered your dashboard make sure you select a router and node from the upper left drop downs. After that, you should begin to see analytics filter into your dashboard. Congrats! You're all done.