Quick Note: Zabbix Server Dashboard CSS Change

Quick Note: Zabbix Server Dashboard  CSS Change

If you're reading this article, you probably already know that Zabbix is one of the premier open source systems monitoring applications out there. They recently released version 7.0, but masochists like me have been running 7.0 betas and for quite a few months prior. The Zabbix web interface - one of my primary motivations for using the software - is pretty kick ass, allowing you to build custom dashboards and do most all of the management-related tasks. However, at some point in the 7.0-pre release cycle, they decided to change the label orientation, as shown in this screenshot:

Zabbix Screenshot - Vertical Tags
Zabbix Screenshot - Vertical Tags

If you're familiar with the interface, you'll notice it immediately - the labels are all vertical instead of horizontal. Granted, it's a minor cosmetic annoyance, but it's also a super easy fix. Here's how:

  1. SSH to your Zabbix server system.
  2. Change to the Zabbix include directory:
    1. cd /usr/share/zabbix/include
  3. Make a backup copy of defines.inc.php:
    1. cp defines.inc.php /root/zabbix_defines.inc.php_backup
  4. Edit defines.inc.php with the editor of your choice (vim, of course!):
    1. Line 2181 reads as:
      1. define('ZBX_STYLE_TEXT_VERTICAL', 'text-vertical');
    2. Edit the line to read as follows:
      1. define('ZBX_STYLE_TEXT_VERTICAL', '');
  5. Save the file and restart Zabbix server:
    1. :wq
    2. systemctl restart zabbix-server
  6. Double-check Zabbix's status:
    1. systemctl status zabbix-server
Zabbix server status from systemctl
  1. Reload the Zabbix server dashboard in your browser. Your tags should now be restored to their former horizontal glory:
Zabbix dashboard with horizontal tabs restored.

As I mentioned earlier, this one is a very minor change and an easy fix to boot, but hopefully some of my fellow Zabbix admins will find it as useful as I did. As always, if you have any questions, don't hesitate to reach out: matt@thesoloadmin.com.