Hide certain 'Criticals'

Steve Shipway s.shipway at auckland.ac.nz
Sun May 14 23:59:33 CEST 2006


...
> > You could set your view to filter out acknowledged alerts?  
> > This is an undocumented option to status.cgi.
...
> Thanks for the reply Steve, how would I filter out the 
> acknowledged alerts?
> After filtering them out, how would I know that they have 
> recovered, does it reset the acknowledgment when a device 
> comes back online?

Acknowledgements are reset once a service or host returns to OK status.

If you pass the option serviceprops to the status.cgi script, you can add a
filter to the services.  From cgiutils.h:

#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

Just add together the options you want.  Something similar exists for
hostproperties.  Therefore, if you do

/nagios/cgi-bin/status.cgi?host=all&servicestatustypes=248&serviceprops=8202
&hostprops=8194

then you will get all services in warn, unknown or critical, where neither
the service nor its host is in scheduled downtime or has notifications
disabled, and the service problem has not been acknowledged.  If you add
'&noheader' to the end then you cal lose the big heading section and see
more alerts on the screen.

This is for Nagios 1.x, but probably is the same in Nagios 2.x.

Steve




-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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