Library

Docs
Beta

Products

Adding Additional Instances To ClusterAlerting On Log EventsAnalyzing LogsAuthenticating and Importing Users with AD and LDAPChanging Data Store PathConfiguring FiltersConfiguring InputsConfiguring Multi Tenancy in Nagios Log ServerConfiguring NXLog To Send Additional Log FilesCreating a Log Server DashboardForwarding Logs from Nagios Log Server to Another DestinationHow To Configure NXLog To Send Multi line Logs To Nagios Log Server.How To Configure Windows To Send Logs To Nagios Log ServerHow To Create A Nagios Log Server Instance In The Amazon EC2 CloudHow To Export Or Schedule Reports In Nagios Log ServerHow To integrate Nagios Log Server with XIHow to Backup and Restore the Nagios Log ServerHow to use a Proxy Server with Nagios Log ServerIntegrating Nagios Log Server with Nagios XILog Server Dashboard OverviewManaging ClustersManaging IndicesManaging Snapshots and MaintenanceMonitoring A New Log SourceMonitoring Apache Logs with Nagios Log ServerMonitoring Linux System Logs using Nagios Log ServerMonitoring Squid Proxy Server With Nagios Log ServerNagios Log Server Adding Additional Instances To ClusterNagios Log Server Administrator GuideNagios Log Server Alerting On Log EventsNagios Log Server Analyzing LogsNagios Log Server Architecture and Overview NWC15Nagios Log Server Changing Data Store PathNagios Log Server Cluster Timezone SettingsNagios Log Server Configuration OverviewNagios Log Server Configuring Input FiltersNagios Log Server Configuring InputsNagios Log Server Configuring NXLog To Send Additional Log FilesNagios Log Server Configuring NXLog To Send Multi Line Log FilesNagios Log Server Conversion for VirtualBoxNagios Log Server Custom Alert Message Email TemplateNagios Log Server Data Backup and ArchivingNagios Log Server ELK documentationNagios Log Server ESXi Syslog ConfigNagios Log Server Exporting Log DataNagios Log Server Full Architecture OverviewNagios Log Server How To Configure SSLNagios Log Server How To Create A Nagios Log Server Instance In The Amazon EC2 Cloud EnvironmentNagios Log Server How To Install Using VMwareNagios Log Server How To Select A DownloadNagios Log Server Important Files And DirectoriesNagios Log Server Introduction WebinarNagios Log Server Jobs Subsystem ArchitectureNagios Log Server License EntitlementsNagios Log Server Listening On Privileged PortsNagios Log Server Log Monitoring and Log Management with Nagios NWC14Nagios Log Server Logging InNagios Log Server Managing ClustersNagios Log Server Managing IndicesNagios Log Server Managing InstancesNagios Log Server Managing Snapshots and MaintenanceNagios Log Server Managing UsersNagios Log Server Monitor Your Log Server InstancesNagios Log Server Monitoring A New Log SourceNagios Log Server Offline UpgradeNagios Log Server Overview And TerminologyNagios Log Server Performance And Storage WalkthroughNagios Log Server Poller Subsystem ArchitectureNagios Log Server Real Life Experience of Nagios Log Server NWC15Nagios Log Server Removing An Instance From A ClusterNagios Log Server Sending Multiline Log Files Using SyslogNagios Log Server Sending NXLogs With SSLNagios Log Server Sending Nagios Core Logs To Nagios Log ServerNagios Log Server Sending syslog with SSL/TLSNagios Log Server Single Instance DeploymentNagios Log Server Updating Logstash PatternsNagios Log Server Upgrade InstructionsNagios Log Server Using An Output To Create Nagios XI Passive ObjectsNagios Log Server Using GeoIP DataNagios Log Server Using The Custom Includes PageRemoving An Instance From A ClusterSend Alerts Based on the Log Server Audit LogSending ESXi Logs To Nagios Log ServerSending Mac OS X Logs To Nagios Log ServerSending NXLogs With SSL/TLSSending Nagios Core Logs To Nagios Log ServerSending syslog With SSL/TLSUpgrade Nagios Log ServerUsing An Output To Create Nagios XI Passive ObjectsWaiting for Database StartupNagios Log Server Monitoring Using NCPA + Nagios XI

Nagios Log Server - Using The Custom Includes Page

Overview

This KB article shows you how to use the Custom Includes page in Nagios Log Server (available in NLS 2.1.0 onwards).

The Custom Includes component allows you to upload your own custom Cascading Style Sheets (CSS), JavaScripts and Images to add customizations to Nagios Log Server. This allows you to customize NLS without the changes being overwritten by future upgrades.

This KB article will show you how to change the color of the header with examples of a solid colour, a gradient and an image.

HTML / CSS / JavaScript skills are required for advanced customizations, this guide is an example of what can be achieved.

This KB article uses Firefox as the web browser, certain steps may vary if you are using a different web browser.

 

Identify The Object Being Changed

First we need to know the object being changed. We are going to change the background color of the Navigation bar in Nagios Log Server so we need to identify the HTML object that needs to be changed.

Right click on the top Navigation bar and select Inspect Element (Q)

This will display an additional window at the bottom of the web browser with the object that you just selected to inspect. In the following screenshot you can see the object has been highlighted.

 

Specifically this piece of information is what we are after:

<div id="header">

The object is a DIV, which is referenced in CSS styling using a # symbol

The name of the object is header

You can close the Inspect Element window by clicking the cross at the top right corner of it.

Create CSS File

Now you need to create a custom CSS file that has the custom color defined in it.

On your workstation, in a text editor create a file called Header-Solid.css with the following content:

    #header {   
        background: rgba(191,220,248,1);
    }

Upload CSS File

In Nagios Log Server Navigate to Admin > Management > Custom Includes

Click the Browse button, navigate to the file Header-Solid.css and then click the Upload button.

You will receive a message saying it "Successfully uploaded file".

Uploaded files are enabled by default. If you would like to disable them, uncheck the checkbox to the left of the file's name.

After clicking the Save Changes button the header background color should change the next time the header is refreshed (click the Admin menu item), you may need to press CTRL + F5 to force a refresh. If you followed this example it will look like:

Gradient

Here's a different example that uses CSS techniques to use a color gradient instead of a solid color. If you search the internet for "CSS Gradient" you'll find some free online tools that will provide you with the CSS code.

On your workstation, in a text editor create a file called **Header-Gradient.css **with the following content:

    #header {   
        background: rgba(191,220,248,1);
        background: -moz-linear-gradient(left, rgba(191,220,248,1) 0%, rgba(132,183,241,1) 100%);
        background: -webkit-gradient(left top, right top, color-stop(0%, rgba(191,220,248,1)), color-stop(100%, rgba(132,183,241,1)));
        background: -webkit-linear-gradient(left, rgba(191,220,248,1) 0%, rgba(132,183,241,1) 100%);
        background: -o-linear-gradient(left, rgba(191,220,248,1) 0%, rgba(132,183,241,1) 100%);
        background: -ms-linear-gradient(left, rgba(191,220,248,1) 0%, rgba(132,183,241,1) 100%);
        background: linear-gradient(to right, rgba(191,220,248,1) 0%, rgba(132,183,241,1) 100%);
        filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#bfdcf8', endColorstr='#84b7f1', GradientType=1 );
    }

Upload Header-Gradient.css using the same method as before. Make sure Header-Gradient.css file shows below Header-Solid.css so that it overwrites any conflicting properties. The result should be something like:

You can see that the navigation bar is getting darker as it progresses from left to right.

Images

Using images is also possible. Here's an example image called background.png I am going to use for the header example:

First you must upload the image.

In Nagios Log Server Navigate to Admin > Management > Custom Includes

Click the Browse button, navigate to the file background.png and then click the Upload button.

You will receive a message saying it "Successfully uploaded file".

Now you need to create a CSS file. On your workstation, in a text editor create a file called **Header-Image.css **with the following content:

    #header {   
        background-image: url("../images/background.png");
    }

It's important to mention that the image files are stored in a directory called images and the css files are stored in a directory called css. Because the CSS code is being accessed from within the css directory we need to use a relative reference to the images folder using the syntax ../images/ as per the code example above.

Upload Header-Image.css using the same method as before. Make sure that Header-Image.css is placed below the existing Header-Solid.css or Header-Gradient.css files in the Custom Includes component. The result should be something like:

Final Thoughts

For any support related questions please visit the Nagios Support Forums at:

http://support.nagios.com/forum/

Nagios Enterprises, LLC

© All rights reserved. 2026