Excluding ackd/downtime on Service Problems (Marc Powell)

Lionel Moore lmoore at shopping.com
Sat Apr 9 04:00:23 CEST 2005


You can construct a URL that creates any filter combination that you
desire by referring to to values set for properties and status types in
cgi/cgiutils.h and common/statusdata.h.  

Use any of the following parameters on status.cgi:
Hoststatustypes=
Servicestatustypes=
Serviceprops=
Hostprops=

Add up the decimal values for all of the properties you want ANDed or
statuses you want ORed.

Like
SERVICE_NO_SCHEDULED_DOWNTIME && SERVICE_CHECKS_ENABLED
Results in status.cgi?serviceprops=34

And 
HOST_PENDING || HOST_UP
Results in status.cgi?hoststatustypes=3

You'll see the definition of the filter you create in the "Display
Filters" box.

The only difficulty I've had is that the filter does an AND on all types
(hoststatustypes,servicestatustypes,serviceprops,and hostprops).  So for
example  status.cgi?serviceprops=1&hostprops=1 will show me nothing
unless I've scheduled downtime for both the host and its services.

Lionel Moore
NOC Systems Administrator
lmoore at shopping.com


>From cgi/cgiutils.h

/****************** HOST AND SERVICE FILTER PROPERTIES
*******************/

#define HOST_SCHEDULED_DOWNTIME         1
#define HOST_NO_SCHEDULED_DOWNTIME      2
#define HOST_STATE_ACKNOWLEDGED         4
#define HOST_STATE_UNACKNOWLEDGED       8
#define HOST_CHECKS_DISABLED            16
#define HOST_CHECKS_ENABLED             32
#define HOST_EVENT_HANDLER_DISABLED     64
#define HOST_EVENT_HANDLER_ENABLED      128
#define HOST_FLAP_DETECTION_DISABLED    256
#define HOST_FLAP_DETECTION_ENABLED     512
#define HOST_IS_FLAPPING                1024
#define HOST_IS_NOT_FLAPPING            2048
#define HOST_NOTIFICATIONS_DISABLED     4096
#define HOST_NOTIFICATIONS_ENABLED      8192

#define SERVICE_SCHEDULED_DOWNTIME      1
#define SERVICE_NO_SCHEDULED_DOWNTIME   2
#define SERVICE_STATE_ACKNOWLEDGED      4
#define SERVICE_STATE_UNACKNOWLEDGED    8
#define SERVICE_CHECKS_DISABLED         16
#define SERVICE_CHECKS_ENABLED          32
#define SERVICE_EVENT_HANDLER_DISABLED  64
#define SERVICE_EVENT_HANDLER_ENABLED   128
#define SERVICE_FLAP_DETECTION_ENABLED  256
#define SERVICE_FLAP_DETECTION_DISABLED 512
#define SERVICE_IS_FLAPPING             1024
#define SERVICE_IS_NOT_FLAPPING         2048
#define SERVICE_NOTIFICATIONS_DISABLED  4096
#define SERVICE_NOTIFICATIONS_ENABLED   8192
#define SERVICE_PASSIVE_CHECKS_DISABLED 16384
#define SERVICE_PASSIVE_CHECKS_ENABLED  32768
#define SERVICE_PASSIVE_CHECK           65536
#define SERVICE_ACTIVE_CHECK            131072


>From common/statusdata.h:

/*************************** SERVICE STATES ***************************/

#define SERVICE_PENDING                 1
#define SERVICE_OK                      2
#define SERVICE_RECOVERY                4
#define SERVICE_WARNING                 8
#define SERVICE_UNKNOWN                 16
#define SERVICE_CRITICAL                32
#define SERVICE_HOST_DOWN               64
#define SERVICE_UNREACHABLE             128


/**************************** HOST STATES ****************************/

#define HOST_PENDING                    1
#define HOST_UP                         2
#define HOST_DOWN                       4
#define HOST_UNREACHABLE                8





--__--__--

Message: 2
Subject: RE: [Nagios-users] Excluding ackd/downtime on Service Problems
Date: Thu, 7 Apr 2005 16:06:07 -0500
From: "Marc Powell" <marc at ena.com>
To: <nagios-users at lists.sourceforge.net>



> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of Jason Martin
> Sent: Thursday, April 07, 2005 9:44 AM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] Excluding ackd/downtime on Service Problems
>=20
> Is there any way to exclude services that are in downtime or
> that are acknowledged from the Service Problems page? I'd like
> to have a screen that shows only problems that need some sort of
> action.

Go to the Tactical Overview. If you have a Critical service that has not
been acknowledged or isn't in Downtime, you'll see something like 'x
Unhandled Problems' in the Critical Column. Click on that link. You
could also add the destination of that link to your side.html menu.
It'll be something like --

http://your.nagios.host/nagios/cgi-bin/status.cgi?host=3Dall&style=3Ddet
a=
il&
servicestatustypes=3D32&hoststatustypes=3D3&serviceprops=3D42

That will only show you unhandled Critical services though.=20

http://your.nagios.host/nagios/cgi-bin/status.cgi?host=3Dall&style=3Ddet
a=
il&
servicestatustypes=3D40&hoststatustypes=3D3&serviceprops=3D42

Should show you Critical and Warning.

--
Marc






-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list