# T.I.G. Stack for OPNsense Firewall

Telegraf Agent + InfluxDB + Grafana stack to build dashboard from for my OPNsense Firewall &amp; Router

# Telegraf Agent --> InfluxDB

With my influxDB + Grafana connection already set up, I just need to create an OPNsense bucket in my InfluxDB container and connect it to a Telegraf agent to my OPNsense set-up.

First, download the Telegraf plug in to your OPNsense machine. Navigate to System ---&gt; Firmware ---&gt; Plug-Ins and download Telegraf:

[![image.png](https://austinhomelabs.com/uploads/images/gallery/2024-03/scaled-1680-/iafC06kXhVdZ4LnH-image.png)](https://austinhomelabs.com/uploads/images/gallery/2024-03/iafC06kXhVdZ4LnH-image.png)

Once installed, navigate to Services ---&gt; Telegraf ---&gt; General and enable the agent:

[![image.png](https://austinhomelabs.com/uploads/images/gallery/2024-03/scaled-1680-/ydPs6w9V1A6tvBUZ-image.png)](https://austinhomelabs.com/uploads/images/gallery/2024-03/ydPs6w9V1A6tvBUZ-image.png)

Save settings, then navigate to Telegraf ---&gt; Output. Enable and enter connection information for your InfluxDB2 container:

[![image.png](https://austinhomelabs.com/uploads/images/gallery/2024-03/scaled-1680-/98qiaQPweObQRxgh-image.png)](https://austinhomelabs.com/uploads/images/gallery/2024-03/98qiaQPweObQRxgh-image.png)

Save settings, then navigate to your influxDB2 GUI and select your bucket to confirm you're receiving data:

[![image.png](https://austinhomelabs.com/uploads/images/gallery/2024-03/scaled-1680-/IFbI23HpcFzWiZIE-image.png)](https://austinhomelabs.com/uploads/images/gallery/2024-03/IFbI23HpcFzWiZIE-image.png)

All set, you can now start building your dashboard with Grafana!

# The Dashboard

In Grafana, either load a template or build your own custom dashboard by navigating to Home ---&gt; Dashboards ---&gt; New:

[![image.png](https://austinhomelabs.com/uploads/images/gallery/2024-03/scaled-1680-/kfbrOxVllXToDSnW-image.png)](https://austinhomelabs.com/uploads/images/gallery/2024-03/kfbrOxVllXToDSnW-image.png)

Given that OPNsense was forked from PFsense, you can either find PFsense dashboards and configure variables accordingly, use OPNsense templates, or just build your own dashboard. I used [OPNsense Metrics](https://grafana.com/grafana/dashboards/16197-opnsense-metrics/). Load the dashboard and configure however you'd like!

[![image.png](https://austinhomelabs.com/uploads/images/gallery/2024-03/scaled-1680-/KvPNPxpXfdWrjxJ6-image.png)](https://austinhomelabs.com/uploads/images/gallery/2024-03/KvPNPxpXfdWrjxJ6-image.png)

[![image.png](https://austinhomelabs.com/uploads/images/gallery/2024-03/scaled-1680-/VVzLVzDx0XczIXWi-image.png)](https://austinhomelabs.com/uploads/images/gallery/2024-03/VVzLVzDx0XczIXWi-image.png)