Changing the look of the Nagios web interface

Although the main focus of the web interface is its functionality and not its look, there is a possibility to change the way how it presents. The Nagios source code comes with two themes—exfoliation and classical. So far, all of the screenshots in this chapter have been prepared using the exfoliation theme, which is the default theme for Nagios since version 3.3.1.

The classical theme was the default for all Nagios versions up to version 3.2.3. To install the classical theme, we need to run the following command from the Nagios source code directory:

make install-classicui

This will install the classical theme and overwrite the theme currently installed for the Nagios web interface. After the command succeeds, the interface will look more familiar to people who use or have used Nagios version 3.2.3 or older.

Depending on your preferences, you may choose to use the new default theme or use the classical one. Apart from a different look and feel, there is no difference in the Nagios UI features or behaviors. The GUI has the exact menu on the left as the theme installed by default, and all of the operations such as scheduling downtime, managing comments, and generating reports are performed in same way.

The Tactical Monitoring Overview page looks significantly different than the one from the exfoliation theme:

Changing the look of the Nagios web interface

Also, the status pages for services and hosts look different than the ones shown before.

The following is a screenshot of the classic UI theme showing the services status:

Changing the look of the Nagios web interface

In order to install the exfoliation theme again, all that is needed is to run the following command from Nagios source code repository:

make install-exfoliation

This will restore the exfoliation theme that is installed by default with Nagios 4, and the GUI will now look same as before installing the classical theme.

Note

Here are also multiple additional themes available on Nagios Exchange at: http://exchange.nagios.org/directory/Addons/Frontends-(GUIs-and-CLIs)/Web-Interfaces/Themes-and-Skins

When choosing a theme, be sure to verify that it is compatible with your version of Nagios.

One of the themes that work properly with Nagios 4 is the Arana theme. It is listed on Nagios Exchange and available directly from SourceForge at http://sourceforge.net/projects/arana-nagios/

While the following instructions were written and tested against the latest Nagios version (4.1.1 at the time of writing), the steps should work for all Nagios versions. In case of any problems, it is recommended that you check the installation guide for the theme for any changes in the installation procedure.

  1. The first thing we should do is to back up our Nagios web interface directory /opt/nagios/share, when installing Nagios according to the steps documented in Chapter 2, Installing Nagios 4

    This can be done using the following command:

    cp -pfR /opt/nagios/share /opt/nagios/share-backup
    
  2. We need to download and unpack the theme. The link to download the theme can be found both on Nagios Exchange and on the SourceForge arana-nagios project. We'll need to download the archive and unpack it anywhere on the disk.
  3. Next, copy the entire contents of the directory containing the unpacked Arana theme archive to /opt/nagios/share.
  4. After this step, the theme should be properly installed and the Nagios page should look similar to the following screenshot:

Changing the look of the Nagios web interface

For most themes, the installation should be the same—extract it and copy its contents to the directory containing the Nagios web interface files.

Themes also usually come with readme or install text files that document the exact installation process; when installing a theme for the first time, it is recommended that you start by reading these files.

Note

Not all Nagios themes and skins that were created for older versions of Nagios will work with Nagios 4. An improved web interface uses PHP for formatting of the templates while previous versions used static HTML pages and this may cause issues with themes not taking this into account.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.121.55