Are you affected by CVE-2024-3400?
Home
>
Blog
>
Integrating IP Fabric with Grafana

Integrating IP Fabric with Grafana

6 minute read
Home
>
Blog
>
Integrating IP Fabric with Grafana
Updated: December 14, 2023
July 14, 2023
Updated: December 14, 2023
6 mins

Let's demonstrate how to integrate IP Fabric directly with Grafana using an Infinity Datasource and creating a Dashboard to visualize the data. This is easily accomplished with the template file located on GitLab and provides your teams a single pane of glass to monitor your network without having to navigate to another website. Following these instructions or those located in the GitLab repo will have you up and running in approximately 5 minutes, so let's get started!

Key Features

  • Device Inventory table.
  • IP Fabric Intent information mirrored to Grafana.
  • Snapshot selector.
  • Intent checks provide filtered links to the data.
  • Example Visualizations for key data points.
  • Fully customizable after importing the template.
  • Supports multiple IP Fabric deployments.

Overview

Example Grafana IP Fabric Dashboard using the included template file.

Variables

Grafana Variables that users are able to adjust to update the data displayed.

In the top left we see three variables that can be set to change the dashboard data:

  • IP Fabric Instance: Used for customers with two or more deployments (this can be disabled for customers with a single deployment which is documented below).
  • Snapshot: Provides a way to switch between the loaded snapshots to update the dashboard's data.

Inventory Data

Grafana IP Fabric Device Inventory information.

The next section provides an overview of the number of licensed and unlicensed devices discovered in the snapshot and the Device Inventory table (limited to 5,000 devices).

IP Fabric Dashboard

IP Fabric Intent Verification Rules Dashboard in Grafana

The IP Fabric Dashboard is a mirrored copy of what is seen in the GUI. This also contains links back to IP Fabric tables. Clicking the URL in the Name column will take you to the unfiltered table, however the links in the Green, Blue, Amber, and Red columns will filter that table based on the color you selected.

Also included are tooltips on all the hyperlinks with the description configured in IP Fabric.

Pro Tip: When creating new intent verification rules or editing the defaults, be sure to add or update the descriptions on each color to ensure your users understand what the rule is signifying. This is seen in the below picture where the highlighted green box has a descriptive message to convey the green color's purpose whereas the red box is used to describe the entire intent check.

Configuring Intent Verification Rules in IP Fabric.

Example Visualizations

Example Grafana Visualizations using IP Fabric table queries.

Finally included in this template are some examples of creating custom visualizations for data your team may want to more closely monitor. These are created using table filters in the GUI and utilizing the API Description to copy those rules into Grafana. To speed up loading of the dashboard, the query is limited to return a single row of data and the value displayed is derived from the returning _meta.count field in the JSON response.

It is not recommended to display tables of data in Grafana due to the current paging limitation. Requesting large amounts of data from IP Fabric using the API without paging can degrade performance for all users.

Installation

Grafana Infinity Data Source

In this section, we will set up the Infinity data source(s) for connection to the IP Fabric instance which the dashboard will use to pull the data.

Requirements

Configuration

In Grafana, navigate using the right hand menu to Connections > Add new connection, search for "Infinity", and select it to create the new connection.

Infinity Datasource configuration.
  • The data source must be named the FQDN of your IP Fabric server for the template to work. If your company policy requires a different naming schema the template can be adjusted to your needs.
  • Expand Authentication and select API Key.
    • The Key is required to be set to X-API-Token.
    • The Value is the API token you created in the IP Fabric GUI.
  • In order for the data source to use this you must also enter the server into the Allowed hosts with https:// prepending it and pressing Add (i.e. https://demo1.eu.ipfabric.io).
  • Finally, select the Save & test button at the bottom of the page.
  • Since IP Fabric is a Snapshot based platform and does not have live data, it is recommended to enable caching under the Cache tab to speed up queries and Dashboard loading.
  • Under TLS/SSL & Network Settings there is an option to skip TLS verification if your IP Fabric instance does not have a trusted certificate installed.

This Dashboard template has been developed to support multiple IP Fabric instances and if this applies to your environment simply create a new data source following these instructions for each of your IP Fabric FQDN(s).

Grafana Dashboard

Now that the connection to IP Fabric has been established we can import the Dashboard. This is done by going to the Grafana Dashboards page selecting New and Import. You will need to access the grafana_model.json file from GitLab and either upload the file or copy/paste the contents in the Import via panel json.

After selecting the Load option you have the ability to change the default Dashboard Name from and the folder it will be located under prior to importing.

Configuration

Once loaded it should take you to the new IP Fabric Dashboard however there is one configuration change to ensure that the dashboard selects the correct data source. Because this template was built to support multiple IP Fabric instances it is required to filter the list of Infinity data sources that are configured across the entire Grafana environment.

  1. In the IP Fabric Dashboard select the gear icon at the top right for the Dashboard settings.
  2. Under the Variables menu select the instance variable to edit it.
  3. If you have a single IP Fabric instance change the Show on dashboard value to Nothing which will disable the drop down to select different servers which is not needed.
  4. To configure this Dashboard to only uses the Infinity source(s) created we will create an Instance name filter regex.
    • For a single instance enter /^FQDN$/ (i.e. /^demo1.us.ipfabric.io$/).
    • For multiple instance you can create a regex to match all your servers or use pipes to filter on your use case (i.e. /^demo1....ipfabric.io$/ or /^demo1.us.ipfabric.io$|^demo1.eu.ipfabric.io$/).
  5. Click Apply.
  6. Click Save dashboard and Close at the top right of the page to return to the Dashboard to verify data is loaded.

Also included is a query to fetch the IP Fabric apiVersion for use in all the queries the Dashboard may request. This should ensure stability after upgrading your deployment(s) to a newer version however it is always recommended to check the Release Notes for any breaking changes that may occur between versions.

Upgrade Notice

A fix has been added to resolve an issue after upgrading to IP Fabric 6.3.x on August 10th, 2023. If you imported the Dashboard prior to the fix and have issues with hyperlinks after upgrading please follow the migration documentation on GitLab.

Summary

In summary using this IP Fabric Integration template can maximize your teams network monitoring visibility into your already preferred dashboard application Grafana. This template is meant to be a jumping point to provide examples of how to interact with IP Fabric using Grafana and can be further customized to your team's needs.

If you have any questions, ideas for new functionality, or need assistance with installation or configuration please reach out to your Solution Architect for assistance. I hope you found this an exciting new way to extend the capabilities of your IP Fabric deployment!

But that's not all, folks!

If this post has piqued your interest, and you'd like to see the integration in action, please check out #TechFabric 7 - Integrating IP Fabric with Grafana Webinar on LinkedIn!

Want to see IP Fabric in action for yourself? Try our free, self-guided demo here.
Prefer the personal touch? Reach out to us to schedule a free demo, zero obligations required!

Integrating IP Fabric with Grafana

Let's demonstrate how to integrate IP Fabric directly with Grafana using an Infinity Datasource and creating a Dashboard to visualize the data. This is easily accomplished with the template file located on GitLab and provides your teams a single pane of glass to monitor your network without having to navigate to another website. Following these instructions or those located in the GitLab repo will have you up and running in approximately 5 minutes, so let's get started!

Key Features

  • Device Inventory table.
  • IP Fabric Intent information mirrored to Grafana.
  • Snapshot selector.
  • Intent checks provide filtered links to the data.
  • Example Visualizations for key data points.
  • Fully customizable after importing the template.
  • Supports multiple IP Fabric deployments.

Overview

Example Grafana IP Fabric Dashboard using the included template file.

Variables

Grafana Variables that users are able to adjust to update the data displayed.

In the top left we see three variables that can be set to change the dashboard data:

  • IP Fabric Instance: Used for customers with two or more deployments (this can be disabled for customers with a single deployment which is documented below).
  • Snapshot: Provides a way to switch between the loaded snapshots to update the dashboard's data.

Inventory Data

Grafana IP Fabric Device Inventory information.

The next section provides an overview of the number of licensed and unlicensed devices discovered in the snapshot and the Device Inventory table (limited to 5,000 devices).

IP Fabric Dashboard

IP Fabric Intent Verification Rules Dashboard in Grafana

The IP Fabric Dashboard is a mirrored copy of what is seen in the GUI. This also contains links back to IP Fabric tables. Clicking the URL in the Name column will take you to the unfiltered table, however the links in the Green, Blue, Amber, and Red columns will filter that table based on the color you selected.

Also included are tooltips on all the hyperlinks with the description configured in IP Fabric.

Pro Tip: When creating new intent verification rules or editing the defaults, be sure to add or update the descriptions on each color to ensure your users understand what the rule is signifying. This is seen in the below picture where the highlighted green box has a descriptive message to convey the green color's purpose whereas the red box is used to describe the entire intent check.

Configuring Intent Verification Rules in IP Fabric.

Example Visualizations

Example Grafana Visualizations using IP Fabric table queries.

Finally included in this template are some examples of creating custom visualizations for data your team may want to more closely monitor. These are created using table filters in the GUI and utilizing the API Description to copy those rules into Grafana. To speed up loading of the dashboard, the query is limited to return a single row of data and the value displayed is derived from the returning _meta.count field in the JSON response.

It is not recommended to display tables of data in Grafana due to the current paging limitation. Requesting large amounts of data from IP Fabric using the API without paging can degrade performance for all users.

Installation

Grafana Infinity Data Source

In this section, we will set up the Infinity data source(s) for connection to the IP Fabric instance which the dashboard will use to pull the data.

Requirements

Configuration

In Grafana, navigate using the right hand menu to Connections > Add new connection, search for "Infinity", and select it to create the new connection.

Infinity Datasource configuration.
  • The data source must be named the FQDN of your IP Fabric server for the template to work. If your company policy requires a different naming schema the template can be adjusted to your needs.
  • Expand Authentication and select API Key.
    • The Key is required to be set to X-API-Token.
    • The Value is the API token you created in the IP Fabric GUI.
  • In order for the data source to use this you must also enter the server into the Allowed hosts with https:// prepending it and pressing Add (i.e. https://demo1.eu.ipfabric.io).
  • Finally, select the Save & test button at the bottom of the page.
  • Since IP Fabric is a Snapshot based platform and does not have live data, it is recommended to enable caching under the Cache tab to speed up queries and Dashboard loading.
  • Under TLS/SSL & Network Settings there is an option to skip TLS verification if your IP Fabric instance does not have a trusted certificate installed.

This Dashboard template has been developed to support multiple IP Fabric instances and if this applies to your environment simply create a new data source following these instructions for each of your IP Fabric FQDN(s).

Grafana Dashboard

Now that the connection to IP Fabric has been established we can import the Dashboard. This is done by going to the Grafana Dashboards page selecting New and Import. You will need to access the grafana_model.json file from GitLab and either upload the file or copy/paste the contents in the Import via panel json.

After selecting the Load option you have the ability to change the default Dashboard Name from and the folder it will be located under prior to importing.

Configuration

Once loaded it should take you to the new IP Fabric Dashboard however there is one configuration change to ensure that the dashboard selects the correct data source. Because this template was built to support multiple IP Fabric instances it is required to filter the list of Infinity data sources that are configured across the entire Grafana environment.

  1. In the IP Fabric Dashboard select the gear icon at the top right for the Dashboard settings.
  2. Under the Variables menu select the instance variable to edit it.
  3. If you have a single IP Fabric instance change the Show on dashboard value to Nothing which will disable the drop down to select different servers which is not needed.
  4. To configure this Dashboard to only uses the Infinity source(s) created we will create an Instance name filter regex.
    • For a single instance enter /^FQDN$/ (i.e. /^demo1.us.ipfabric.io$/).
    • For multiple instance you can create a regex to match all your servers or use pipes to filter on your use case (i.e. /^demo1....ipfabric.io$/ or /^demo1.us.ipfabric.io$|^demo1.eu.ipfabric.io$/).
  5. Click Apply.
  6. Click Save dashboard and Close at the top right of the page to return to the Dashboard to verify data is loaded.

Also included is a query to fetch the IP Fabric apiVersion for use in all the queries the Dashboard may request. This should ensure stability after upgrading your deployment(s) to a newer version however it is always recommended to check the Release Notes for any breaking changes that may occur between versions.

Upgrade Notice

A fix has been added to resolve an issue after upgrading to IP Fabric 6.3.x on August 10th, 2023. If you imported the Dashboard prior to the fix and have issues with hyperlinks after upgrading please follow the migration documentation on GitLab.

Summary

In summary using this IP Fabric Integration template can maximize your teams network monitoring visibility into your already preferred dashboard application Grafana. This template is meant to be a jumping point to provide examples of how to interact with IP Fabric using Grafana and can be further customized to your team's needs.

If you have any questions, ideas for new functionality, or need assistance with installation or configuration please reach out to your Solution Architect for assistance. I hope you found this an exciting new way to extend the capabilities of your IP Fabric deployment!

But that's not all, folks!

If this post has piqued your interest, and you'd like to see the integration in action, please check out #TechFabric 7 - Integrating IP Fabric with Grafana Webinar on LinkedIn!

Want to see IP Fabric in action for yourself? Try our free, self-guided demo here.
Prefer the personal touch? Reach out to us to schedule a free demo, zero obligations required!

SHARE
Demo

Try out the platform

Test out IP Fabric’s automated network assurance platform yourself and be inspired by the endless possibilities.

What would this change for your network teams?
Start live demo
 
 
 
 
 
We're Hiring!
Join the Team and be part of the Future of Network Automation
Available Positions
98 North Washington Street
Suite 407
Boston, MA 02114
United States
This is a block of text. Double-click this text to edit it.
Phone : +1 617-821-3639
IP Fabric s.r.o.
Kateřinská 466/40
Praha 2 - Nové Město, 120 00
Czech Republic
This is a block of text. Double-click this text to edit it.
Phone : +420 720 022 997
IP Fabric UK Limited
Gateley Legal, 1 Paternoster Square, London,
England EC4M 7DX
This is a block of text. Double-click this text to edit it.
Phone : +420 720 022 997
IP Fabric, Inc. © 2024 All Rights Reserved