THIS KNOWLEDGE BASE HAS BEEN ARCHIVED AND IS NO LONGER BEING UPDATED
Please visit library.nagios.com/docs for the latest and most up-to-date documentation.
Home » Categories » Multiple Categories

Nagios XI - Create Host And Service URLs With Filters

Overview

This article will show you how to create a host or service URL in Nagios XI that is restricted to a set of filters.

First you will be shown how to show services in a WARNING or CRITICAL state.

Then you will be shown how to restrict this to only services in a HARD state.

 

How To

Open Nagios XI

On the Home menu, under Quick View click Tactical Overview

Right click on the services column X Critical and select Open Link in New Tab

Look at the url, it ends with &servicestatustypes=16

Do the same for the services column X Warning and select Open Link in New Tab

Look at the url, it ends with &servicestatustypes=4

4+ 16 = 20

Now change the URL to &servicestatustypes=20 and now you'll see Warning and Critical on the one page.

 

 

All of these numbers are defined in the file /usr/local/nagiosxi/html/includes/constants.inc.php

// PSEUDO-STATES (USED IN LINKS, ETC)
define("SERVICESTATE_PENDING", 1);
define("SERVICESTATE_OK", 2);
define("SERVICESTATE_WARNING", 4);
define("SERVICESTATE_UNKNOWN", 8);
define("SERVICESTATE_CRITICAL", 16);
define("SERVICESTATE_ANY", 31);

 

In relation to only showing services in a HARD state, looking in the file constants.inc.php we find the following:

define("SERVICESTATUSATTR_HARDSTATE", 262144);

 

You can add &serviceattr=262144 to the URL and it will only show the HARD states. Your final URL would look something like:

http://xitest/nagiosxi/includes/components/xicore/status.php?show=services&servicestatustypes=20&serviceattr=262144

 

 

 

 

Final Thoughts

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

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



Special Offer For Knowledgebase Visitors! Get a huge discount on Nagios Log Server by clicking below.

Get 60% Off Nagios Log Server!

Did you know? Nagios provides complete monitoring of: Windows, Linux, UNIX, Servers, Websites, SNMP, DHCP, DNS, Email, Storage, Files, Apache, IIS, EC2, and more!

3 (1)
Article Rating (1 Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
Nagios XI - Performance Data Averaging
Viewed 10150 times since Mon, Nov 6, 2017
Using The Generic Plugin Monitoring Wizard In Nagios XI
Viewed 2883 times since Tue, Dec 17, 2024
Nagios XI - Monitoring Using the Full Power of Nagios XI Enterprise - NWC15
Viewed 9993 times since Mon, Feb 8, 2016
Nagios XI - Importing Config Files From Nagios Core into Nagios XI
Viewed 18360 times since Wed, Jan 27, 2016
Nagios XI - Plain Text Password Considerations
Viewed 14335 times since Mon, Jun 18, 2018
Nagios XI - Using rrdcached with Nagios XI
Viewed 7505 times since Thu, Jan 28, 2016
Nagios XI - Automated Host Management In Nagios XI
Viewed 8329 times since Wed, Jan 27, 2016
Nagios XI - Understanding And Using XI Tools
Viewed 5199 times since Sun, Jul 9, 2017
Database Storage Engine and High CPU usage in Nagios XI
Viewed 6506 times since Thu, Mar 4, 2021
Nagios XI - Understanding the Nagios XI Directory Structure
Viewed 8227 times since Thu, Jan 28, 2016