Transform Your Zabbix Dashboard: Visualizing Network Switches Like a Pro

How many of you have dreamed of having a dashboard in Zabbix where you can easily see the status of every single port on your network switch, complete with real-time highlights and traffic data?

Why You Need a Visual Switch Dashboard in Zabbix

Let's be honest: while Zabbix is an incredibly powerful monitoring tool, it often gives off the appearance of a giant Excel spreadsheet filled with endless rows of data. Sometimes, it isn't easy to understand exactly what we are visualizing at a glance.

Using a graphical approach to represent the physical objects we are monitoring helps immensely. The Zabbix Switch Widget, developed by OpenSource ICT Solutions (a long-term Zabbix partner based in Belgium), gives you all the information you would normally get by standing physically in front of a server rack. A huge shoutout to my friend Patrick and his team for developing this project!

Step-by-Step Installation Guide for Zabbix 7.0 LTS

Let's dive into the Zabbix console and understand how to install this module. For this guide, I am using a Zabbix 7.0 LTS machine, which I always recommend for production environments.

1. Clone the Repository

First, you need to navigate to your Zabbix modules directory. (Note: Depending on your specific Zabbix version and OS, this is typically located at /usr/share/zabbix/modules or a similar path in your web root). Once you are in the correct directory, you need to clone the project repository.

2. Set the Correct Permissions

It is crucial to give the correct file permissions to your application server (whether you are using Apache or Nginx). This ensures that you can save your configuration profiles directly within the widget. If you skip this step, your custom switch profiles will not persist!

3. Enable the Module in the Zabbix GUI

Once the files are in place and permissions are set, switch over to your Zabbix web interface:

Configuring the Switch Widget

With the module enabled, navigate to your desired dashboard, click edit, and add a new widget. Select Switch from the widget list. Here is where the real magic happens, but you need to pay close attention to how you map your SNMP items.

Mapping the Host and Ports

First, select the Host you want to visualize (in my case, a 16-port Unifi Switch). You will need to define pattern matching for your network traffic and ports.

Generic Switch Information

You can also pull generic switch data into the widget for a complete overview:

Visual Layout and Heatmap Settings

One of the best features is the Utilization Settings. By providing the item key for the port's negotiated speed (e.g., net.if.speed[ifSpeed.*]), the widget calculates bandwidth utilization automatically without needing a separate calculated item in Zabbix!

This powers a beautiful heatmap. As traffic increases on a port, its color transitions from a light green to a dark, highlighted green based on the thresholds you define. You can also customize the physical layout of the switch in the widget settings—defining the number of rows, standard ports, and SFP ports so it perfectly matches your physical hardware.

Current Limitations and Community Feedback

Because this is a relatively new project, there are a few minor bugs. For instance:

If you test this out and notice these or other anomalies, I highly recommend opening an issue on the project's GitHub page. Open source thrives on community feedback, and reporting bugs helps the developers improve the tool for everyone.

Conclusion

Despite a few minor areas for improvement, this widget is an absolute game-changer for anyone who needs to monitor network infrastructure and wants a more intuitive, visually appealing representation of their hardware. Making Zabbix accessible and easy to read for people who might not be "super experts" is incredibly valuable.

I hope to see more projects like this in the future! We are always working to find better, more pleasant ways to visualize the devices we monitor, ensuring that the most sensitive components of our IT infrastructure are highlighted clearly.

What do you think of this project? Let me know your thoughts in the comments! In my opinion, it definitely deserves a star on GitHub from all of us.


Stay Connected:

A big greeting from Dimitri, and I'll see you next week with a new video. Bye!