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 Appliance or Virtual Machine.
NetQ collects statistics for physical interfaces; it does not collect statistics for virtual interfaces, such as bonds, bridges, and VXLANs.
NetQ displays:
- Transmit with tx_ prefix: bytes, carrier, colls, drop, errs, packets
- Receive with rx_ prefix: bytes, drop, errs, frame, multicast, packets
You can use Grafana version 6.x or 7.x, an open source analytics and monitoring tool, to view these statistics. The fastest way to achieve this is by installing Grafana on an application server or locally per user, and then installing the NetQ plugin.
If you do not have Grafana installed already, refer to grafana.com for instructions on installing and configuring the Grafana tool.
Install NetQ Plugin for Grafana
Use the Grafana CLI to install the NetQ plugin. For more detail about this command, refer to the Grafana CLI documentation.
The Grafana plugin comes unsigned. Before you can install it, you need to update the grafana.ini
file then restart the Grafana service:
-
Edit
/etc/grafana/grafana.ini
and addallow_loading_unsigned_plugins = netq-dashboard
to the file:cumulus@netq-appliance:~$ sudo nano /etc/grafana/grafana.ini ... allow_loading_unsigned_plugins = netq-dashboard ...
-
If you are using Grafana v11.0 or later, add support for AngularJS to the same file:
cumulus@netq-appliance:~$ sudo nano /etc/grafana/grafana.ini ... angular_support_enabled = true ...
-
Restart the Grafana service:
cumulus@netq-appliance:~$ sudo systemctl restart grafana-server.service
Then install the plugin:
cumulus@switch:~$ grafana-cli --pluginUrl https://netq-grafana-dsrc.s3-us-west-2.amazonaws.com/NetQ-DSplugin-3.3.1-plus.zip plugins install netq-dashboard
installing netq-dashboard @
from: https://netq-grafana-dsrc.s3-us-west-2.amazonaws.com/NetQ-DSplugin-3.3.1-plus.zip
into: /usr/local/var/lib/grafana/plugins
✔ Installed netq-dashboard successfully
After installing the plugin, you must restart Grafana, following the steps specific to your implementation.
Set Up the NetQ Data Source
Now that you have the plugin installed, you need to configure access to the NetQ data source.
-
Open the Grafana user interface.
-
Log in using your application credentials.
The Home Dashboard appears.
-
Click Add data source or > Data Sources.
-
Enter Net-Q in the search box. Alternately, scroll down to the Other category, and select it from there.
-
Enter Net-Q into the Name field.
-
Enter the URL used to access the database:
- Cloud: https://plugin.prod.netq.nvidia.com
- On-premises: <hostname-or-ipaddr-of-netq-appl-or-vm>/plugin
- Cumulus in the Cloud (CITC): plugin.air.netq.cumulusnetworks.com
-
Select procdevstats from the Module dropdown.
-
Enter your credentials (the ones used to log in).
-
For NetQ 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 Your NetQ Dashboard
With the data source configured, you can create a dashboard with the transmit and receive statistics of interest to you.
Create a Dashboard
-
Click to open a blank dashboard.
-
Click (Dashboard Settings) at the top of the dashboard.
Add Variables
-
Click Variables.
-
Enter hostname into the Name field.
-
Enter hostname into the Label field.
-
Select Net-Q from the Data source list.
-
Select On Dashboard Load from the Refresh list.
-
Enter hostname into the Query field.
-
Click Add.
You should see a preview at the bottom of the hostname values.
-
Click Variables to add another variable for the interface name.
-
Enter ifname into the Name field.
-
Enter ifname into the Label field.
-
Select Net-Q from the Data source list.
-
Select On Dashboard Load from the Refresh list.
-
Enter ifname into the Query field.
-
Click Add.
You should see a preview at the bottom of the ifname values.
-
Click Variables to add another variable for metrics.
-
Enter metrics into the Name field.
-
Enter metrics into the Label field.
-
Select Net-Q from the Data source list.
-
Select On Dashboard Load from the Refresh list.
-
Enter metrics into the Query field.
-
Click Add.
You should see a preview at the bottom of the metrics values.
Add Charts
-
Now that the variables are defined, 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.
-
Select one or more hostnames from the hostname list.
-
Select one or more interface names from the ifname list.
-
Select one or more metrics to display for these hostnames and interfaces from the metrics list.
This example shows a dashboard with two hostnames, two interfaces, and one metric selected. The more values you select from the variable options, the more charts appear on your dashboard.
Analyze the Data
Once you have your dashboard configured, you can start analyzing the data. 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 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