In today’s complex network environments, ensuring compliance and tracking configuration consistency are critical for maintaining reliability and security. NetBrain’s Golden Engineering Studio (GES) provides a robust framework for automating network design compliance checks, leveraging Golden Config, Golden Feature, and Golden Intent to monitor network configurations dynamically.
This blog post walks through a practical project NetBrain Engineer, Terry Fera: Building a Grafana dashboard by integrating NetBrain’s compliance data with Grafana for a real-time visualization of Golden Config Check results. By following the steps outlined below, you’ll be able to transform raw compliance data from NetBrain into an intuitive, data-driven dashboard for proactive monitoring.
Why Network Compliance Matters
Network compliance is essential for:
- Security – Ensuring device configurations adhere to industry standards (e.g., AAA, ACL rules, encryption protocols).
- Operational Stability – Identifying drift from best-practice configurations before they cause outages.
- Regulatory Requirements – Meeting standards such as PCI-DSS, HIPAA, or internal corporate policies.
NetBrain’s Golden Config Checks automate the detection of non-compliant configurations by reverse-engineering existing network settings and applying predefined rules. However, while NetBrain provides robust compliance reporting, integrating this data into Grafana allows for custom dashboards that provide a broader operational view.
Solution Overview
The proposed solution extracts compliance data from NetBrain using a Python script, stores it in an SQL database, and then visualizes it in Grafana. This workflow provides continuous compliance tracking with real-time dashboards.

Workflow
- NetBrain Collects Device Configurations – Network configurations are retrieved across multi-vendor environments.
- NetBrain Runs Golden Config Checks – Automated compliance checks evaluate device configurations against defined policies.
- Python Script Extracts Compliance Data – Using NetBrain’s TAF-Lite API, compliance results are retrieved.
- Data is Stored in a SQL Database – Parsed results are inserted into a structured database table.
- Grafana Visualizes Compliance Status – Grafana reads SQL data and presents a compliance overview with charts, tables, and alerts.
Step-by-Step Implementation
1. Setting Up NetBrain for Compliance Checks
Before exporting data to Grafana, ensure NetBrain is configured to run Golden Config Checks:
- Create a Compliance Feature
- Example: AAA Authentication Checks
- Define key configuration parameters to be monitored.
- Create Feature for overall Compliance Checks (AAA Enabled Test in this example)
- Calculate and Define Role
- Publish
- Create a Golden Config & Intent
- Link the compliance check to an Intent to be executed periodically.
- Name the rule what you want it to show up as in the dashboard
- The python script will parse this from the resulting Intent name, so this is important
- Parse >> Discover >> Add to Golden

- Golden Intent
- Create new Golden Intent
- Relate to Feature created in first step
- Add Golden Config to Golden Intent
- Customize the Intent settings:

- Update the Name Rule:
- For the intent to include a divider between the intent name and device name (in this example adding – – in between, this will be parsed by the python script)

- Define Message Manually
- In this example we are using this format, it will be parsed by the python script later, it will look for the Pass/Fail status from the value between [ ]

- Define Alerting
- Set the message to be at the Intent level rather than the device level for both Alert and no alert
- This is important because of the way status messages are reported in ADTs

- Publish and Execute all Checks
- Open NetBrain’s ADT (Automation Data Table) Manager
- Find the Feature table from the initial feature created
- Execute all intents in the table
- Configure TAF-Lite
- Open Triggered Automation Manager
- Add a new ADT View to TAF-Lite
- Select the Feature table with the compliance checks
- Save and Close once completed

Next we can move onto our Python & SQL setup.
2. Extracting Compliance Data using Python
A Python script is used to retrieve NetBrain’s compliance data and store it in a database. The script follows these steps:
2.1 Install Required Dependencies
Ensure Python and the necessary libraries are installed:
pip install requests pymysql
2.2 Query NetBrain’s TAF-Lite API
NetBrain’s Triggered Automation Framework (TAF-Lite) provides API-based access to compliance data.
Sample Python script to retrieve data:
import requests
import pymysql
import json
# NetBrain API Credentials
NB_URL = "https://your-netbrain-instance/api"
API_KEY = "your_api_key"
# SQL Database Configuration
DB_HOST = "localhost"
DB_USER = "compliance_user"
DB_PASS = "P@ssw0rd"
DB_NAME = "compliance_results"
# Fetch Compliance Data
def fetch_compliance_results():
headers = {"Authorization": f"Bearer {API_KEY}"}
response = requests.get(f"{NB_URL}/taf-lite/compliance-results", headers=headers)
if response.status_code == 200:
return response.json()
else:
print("Error fetching data")
return None
# Store Data in SQL
def store_results(data):
connection = pymysql.connect(host=DB_HOST, user=DB_USER, password=DB_PASS, database=DB_NAME)
cursor = connection.cursor()
for record in data:
sql = """INSERT INTO compliance_results.results
(timestamp, device, rulename, result, status)
VALUES (%s, %s, %s, %s, %s)
ON DUPLICATE KEY UPDATE result=%s, timestamp=%s"""
cursor.execute(sql, (record["timestamp"], record["device"], record["rulename"], record["result"], record["status"], record["result"], record["timestamp"]))
connection.commit()
cursor.close()
connection.close()
# Main Execution
data = fetch_compliance_results()
if data:
store_results(data)
3. Setting Up SQL Database
To store compliance results, create an SQL database and table for compliance results:
CREATE TABLE compliance_results.results (
timestamp DATETIME NULL,
device VARCHAR(100) NULL,
rulename VARCHAR(100) NULL,
result VARCHAR(100) NULL,
status VARCHAR(100) NULL,
PRIMARY KEY (device, rulename)
);
Next, validate that user is created and able to read the database
CREATE USER compliance_user IDENTIFIED BY 'P@ssw0rd';
GRANT ALL ON compliance_results.* TO compliance_user;
4. Visualizing Data in Grafana
Grafana is a powerful, open-source visualization tool used for monitoring and analyzing time-series data. It supports multiple data sources, including SQL databases, Prometheus, InfluxDB, and Elasticsearch, making it ideal for real-time network compliance monitoring.
Is Grafana Free?
Yes! Grafana offers a free open-source version that is fully capable of handling this project. Here are your options:
- Grafana OSS (Free) – Self-hosted, open-source version with full dashboard capabilities. Best if you’re running your own server.
- Grafana Cloud (Free Tier) – Managed cloud version with a free plan that includes up to 50GB of logs and metrics. Ideal for smaller projects.
- Grafana Enterprise (Paid) – For large-scale enterprise deployments with advanced security and support.
For this project, Grafana OSS (self-hosted) or Grafana Cloud’s free tier are both excellent choices.
4.1 Configuring Grafana
After your preferred install method has been fully setup, we need to move to setting up our data sources. (Access Grafana at http://localhost:3000/)
to log in).
4.2 Add SQL Database as a Data Source
- Navigate to Configuration > Data Sources.
- Select MySQL and enter:
- Host:
localhost
- Database:
compliance_results
- User:
compliance_user
- Password:
P@ssw0rd
- Click Save & Test.
4.3 Create a Compliance Dashboard
- Create a New Dashboard
- Add a Panel:
- Query Example:
SELECT timestamp, device, rulename, status FROM results
- Visualization: Table or Status Heatmap
- Set Thresholds for Pass/Fail indicators.
- Set Alerts:
- Trigger: If compliance drops below 95%.
- Notification: Send alerts via Slack, email, or Webhook.
Everything You Need to Get Started
To successfully complete this NetBrain-to-Grafana integration, here are all the tools, references, and example scripts you’ll need:
1. Database: MariaDB vs MySQL
- MariaDB is a free, open-source alternative to MySQL with similar syntax but improved performance and licensing flexibility.
- Installation (MariaDB on Linux):
sudo apt update && sudo apt install mariadb-server
- If you prefer MySQL, the same SQL table creation queries in this post work without modifications.
2. Terry’s GitHub Repository
Terry has shared example Python scripts that can simplify:
✅ Fetching compliance data from NetBrain’s TAF-Lite API
✅ Parsing results into a structured SQL database
✅ Formatting data for easy visualization in Grafana
Find Terry’s scripts here:
GitHub Repository: Compliance Dashboard
3. Grafana Setup & Guides
- Grafana Installation Guide: https://grafana.com/docs/grafana/latest/setup-grafana/installation/
- This guide provides step-by-step instructions for installing Grafana on Linux, Windows, macOS, and Docker, ensuring that you can set up a self-hosted instance for your compliance dashboard.
- Grafana Cloud Free Signup: https://grafana.com/auth/sign-up
- This page allows you to create a free Grafana Cloud account, which includes 50GB of logs, 10k metrics, and 50GB of traces per month, making it a great option for hosting your NetBrain compliance dashboard without needing to self-host Grafana.
4. NetBrain API Documentation
- Understanding NetBrain’s TAF-Lite API for retrieving compliance results: NetBrain API Docs
About Terry Fera
This blog showcases a solution developed by Terry Fera, a veteran network engineer with more than 15 years of experience across mining, healthcare, and education sectors. Terry brings a rare combination of deep technical knowledge and a practical, customer-first mindset. His focus on real-world automation and data visualization enables NetBrain customers to solve complex challenges with accessible, scalable solutions.
As the mind behind this NetBrain-to-Grafana integration, Terry continues to drive innovation by making network compliance and observability more actionable for everyone—from frontline engineers to enterprise architects. His work exemplifies how NetBrain’s no-code platform can unlock value in ways that are both powerful and approachable.
Stay tuned for more of Terry’s insights, as he continues to simplify and extend the reach of network automation across the industry!
Empowering Your Network Compliance Monitoring
By following this guide, you’ve taken a major step toward automating network compliance tracking with NetBrain’s Golden Config Checks, MariaDB, and Grafana. You now have a fully functional compliance dashboard that transforms raw network configuration checks into a real-time visual monitoring system.
This project isn’t just about visualizing data—it’s about proactive network management. With these tools in place, you can:
✅ Identify non-compliant network configurations faster
✅ Reduce manual troubleshooting efforts
✅ Prevent network drift with continuous compliance tracking
This integration can scale with your organization’s needs, and you can expand it further by:
📌 Adding historical compliance trend tracking
📌 Triggering automated remediation in NetBrain
📌 Integrating ITSM tools like ServiceNow for alerts
Keep Exploring & Innovating!
We encourage you to modify the scripts, experiment with additional NetBrain automation features, and share your insights with the community! If you have questions, challenges, or cool enhancements, let us know—we’d love to hear how you’re using NetBrain with Grafana to drive automation success!