Updated patches for 2.5 (same_host dependency, groupextinfo, disabledstatus)
william(at)elan.net
william at elan.net
Wed Nov 8 00:59:52 CET 2006
I've updated my patches to nagios 2.5 and created partial index and
minimum documentation at http://www.elan.net/~william/nagios/
I had to mostly rewrite what was discussed here as "same_host"
dependency as I wanted to make it general to accept more then just
servicegroups (of course it ended up being a lot more complex, but
its quite clean now; it is however not well optimized executing same
servicelist discover functions - for lot and lot of services this
would be a problem and at some if enough people want, I can try to
write some caching code). The patch is at
http://www.elan.net/~william/nagios/nagios25-support_samehostdependency.patch
and here are examples of what it allows to do:
define servicedependency{
host_name *
servicegroup_name master_service
dependent_same_host 1
dependent_service_description *
execution_failure_criteria n
notification_failure_criteria u,c
}
define servicedependency{
hostgroup_name net_snmp,cisco
servicegroup_name snmp_master
dependent_same_host 1
dependent_servicegroup_name snmp
execution_failure_criteria n
notification_failure_criteria u,c
}
I also updated groupextinfo draft I previously posted (for 2.3.1) which
adds hostgroupextinfo and servicegroupextinfo objects (and adding new
objects causes lots of code, patch is > 200k; nagios being pure 'C'
code causes to have to do very similar code to implement each object;
C++ is less repetitive with proper inheritance...):
http://www.elan.net/~william/nagios/nagios25-support_groupextinfo.patch
In this patch added new option "allow_extinfo_missingconfig" which would
print WARNING instead of ERROR if service/host is not defined in base
nagios (I ran into this problem with extinfo being added by external
program and it can not always be 100% in sync with nagios). An example
of config using that patch is:
define hostgroupextinfo{
hostgroup_name nagios
action_url /nagios/cgi-bin/ngrapher/ngraphs.cgi?action=HGROUPGRAPH&hostgroup=nagios
action_icon ngrapher/graph.png
action_icon_alt View Graphs For Hostgroup nagios
action_textinfo View Graphs For Hostgroup nagios
target_frame _self
}
I also ported patch that adds "DISABLED" status:
http://www.elan.net/~william/nagios/nagios25-support_disabledstatus.patch
this is useful when you have some host/service that you expect to be down
for long period but you don't want to remove it from config file - then
instead of scheduling downtime for longer period (which would still cause
checks to be done), you could "disable active checks" using CGI but it
then still shows up as RED on the status page which is somewhat annoying
as its basically known/expected problem. This moves it to special 'DISABLED'
status showing up as GREY and no longer counted as known problem.
Note: If you're applying multiple of above patches, I'd recommend doing
it in the order listed above (i.e. samehostdependency, groupextinfo,
disabledstatus).
---
William Leibzon
Elan Networks
william at elan.net
-------------------------------------------------------------------------
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
More information about the Developers
mailing list