Hide certain 'Criticals'

jonr at destar.net jonr at destar.net
Mon May 15 02:52:51 CEST 2006


Quoting Steve Shipway <s.shipway at auckland.ac.nz>:

> ...
> > > 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


Brilliant!!!! Steve, that is awesome information, thanks again for taking the
time to write this out and clue me in.

Since you seem to have all the answers how about this one:  ;)

I have a script that monitors all snmp messages and if I down a port and then
quickly bring it back up I immediately see it in my log watch script, but
nagios will miss it. Is there a way to have nagios display snmp messages in
real-time?

Jon




-------------------------------------------------------
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