Filtering display of current status in CGI

Steve Shipway s.shipway at auckland.ac.nz
Thu Jul 6 00:36:48 CEST 2006


Hi --

I need to get a display of the current problems to go up on the Operations'
status screen.  So far, I can do this with:

status.cgi?hostgroup=x-production&style=detail&servicestatustypes=248&servic
eprops=8202&hostprops=8202&noheader&sorttype=2&sortoption=3

which limits display to just the 'production' hostgroup (IE, none of the
test servers), selects just the unknown/warn/crit services, and filters out
anything which has alerts disabled or is in scheduled downtime.  Finally, it
is sorted in decending severity order.

However, there are a couple of problems!

Firstly, if a host is down, then it can have up to 20 services in various
states - all I want to know is that the host is down.  So, I've modified the
status.cgi slightly to just display the host status if the host is down or
unreachable (fairly easy to do).  At the same time, I've made the 'Attempt'
column go dark if it is in 'hard' state and faint otherwise.

Secondly, I'd like to hide alerts for things which are outside their
notification period, in the same way as hiding things with alerts disabled.
The operations will see an alert on the screen, and not realise that it is
outside of the notify period for this service - and will call the oncall
persion.  This is a bit harder and I haven't done it yet, although I notice
the required test functions are in the library.

What I'd like is for Nagios 2.x to incorporate both of these.  Maybe an
extra filter option to hostprops and serviceprops to say 'only if in valid
notify time'?  If Ethan is reading this, that would be on my wishlist :).
Does anyone have a way of achieving this already?

I've made most of these changes (plus changing to Euro date formats
throughout, and changing the defaults in cmd.cgi) for Nagios 1.4, but now I
have the big job of moving my patches to Nagios 2.x.  Having a site-specific
customisation is a pain anyway, it would be better to have these few patches
added to the dev tree.  Any Nagios development people about?

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