Integrate NetQ with Grafana
Switches collect statistics about the performance of their interfaces. The NetQ Agent on each switch collects these statistics every 15 seconds and then sends them to your NetQ Server or Appliance.
NetQ only collects statistics for physical interfaces; it does not collect statistics for virtual (non-physical) interfaces, such as bonds, bridges, and VXLANs. Specifically, the NetQ Agent collects the following interface statistics:
Transmit: tx_bytes, tx_carrier, tx_colls, tx_drop, tx_errs, tx_packets
Receive: rx_bytes, rx_drop, rx_errs, rx_frame, rx_multicast, rx_packets
You can use Grafana, an open source analytics and monitoring tool, to view the interface statistics collected by the NetQ Agents. The fastest way to achieve this is by installing Grafana on an application server or locally per user, and then importing the prepared NetQ dashboard.
Install NetQ Plug-in for Grafana
The first step is to install the NetQ plug-in on your NetQ server or appliance. There are three ways to install the plug-in:
Docker File: Add the following to your existing Dockerfile
# grafana docker file FROM grafana/grafana:6.2.2 RUN grafana-cli --pluginUrl https://netq-grafana-dsrc.s3-us-west-2.amazonaws.com/dist.zip plugins install netq-dashboard
Grafana Docker Image: Download and run the plug-in in your Grafana Docker container
$ docker run -d -p 3000:3000 --name=grafana -e "GF_INSTALL_PLUGINS=https://netq-grafana-dsrc.s3-us-west-2.amazonaws.com/dist.zip;netq-dashboard" grafana/grafana
Grafana CLI: Download and install the Grafana plug-in using Grafana CLI
brew update brew install grafana brew services start grafana grafana-cli --pluginUrl https://netq-grafana-dsrc.s3-us-west-2.amazonaws.com/dist.zip plugins install netq-dashboard brew services restart grafana
Then restart Grafana.
The Grafana GUI is accessed through port 3000 by default. If you are running Grafana on a simulation server, you may need to modify forwarding rules in IPtables to allow access to port 3000.
Set Up a Dashboard
The quickest way to view the interface statistics for your Cumulus Linux network is to make use of the pre-configured dashboard installed with the plug-in. Once you are familiar with that dashboard, you can create new dashboards or add new panels to the NetQ dashboard.
Open the Grafana user interface:
- Remote access: Enter <NetQ-Server-or-Appliance-IPaddr>:3000 in a web browser address field.
- Local access: Enter localhost:3000 in a web browser address field.
Log in using your application credentials.
The Home Dashboard appears.
Click Add data source or > Data Sources.
Enter Net-Q in the search box or scroll down to the Other category, and select Net-Q from there.
Enter Net-Q into the Name field.
Enter the URL used to access the NetQ cloud service; for example api.netq.cumulusnetworks.com
Enter your credentials (the ones used to login)
For cloud deployments only, if you have more than one premises configured, you can select the premises you want to view, as follows:
If you leave the Premises field blank, the first premises name is selected by default
If you enter a premises name, that premises is selected for viewing
Note: If multiple premises are configured with the same name, then the first premises of that name is selected for viewing
Click Save & Test
Create a Dashboard
You can either use the dashboard provided with the plug-in, NetQ Interface Statistics, or create your own.
To use the Cumulus-provided dashboard, select the NetQ Interface Statistics from the left panel of the Home Page.
If you choose this option, you can skip directly to analyzing your data.
To create your own dashboard:
Click to open a blank dashboard.
Click (Dashboard Settings) at the top of the dashboard.
Enter hostname into the Name field.
Enter Hostname into the Label field.
Select Net-Q from the Data source list.
Enter hostname into the Query field.
You should see a preview at the bottom of the hostname values.
Click to return to the new dashboard.
Click Add Query.
Select Net-Q from the Query source list.
Select the interface statistic you want to view from the Metric list.
Click the General icon.
Select hostname from the Repeat list.
Set any other parameters around how to display the data.
Return to the dashboard.
Add additional panels with other metrics to complete your dashboard.
Analyze the Data
Once you have your dashboard configured, you can start analyzing the data:
Select the hostname from the variable list at the top left of the charts to see the statistics for that switch or host.
Review the statistics, looking for peaks and valleys, unusual patterns, and so forth.
Explore the data more by modifying the data view in one of several ways using the dashboard tool set:
- Select a different time period for the data by clicking the forward or back arrows. The default time range is dependent on the width of your browser window.
- Zoom in on the dashboard by clicking the magnifying glass.
- Manually refresh the dashboard data, or set an automatic refresh rate for the dashboard from the down arrow.
- Add a new variable by clicking the cog wheel, then selecting Variables
- Add additional panels
- Click any chart title to edit or remove it from the dashboard
- Rename the dashboard by clicking the cog wheel and entering the new name