some addition to nagios I'm working on

william(at)elan.net william at elan.net
Tue Jun 20 00:22:39 CEST 2006


[I sent earlier version of this to wrong list by accident last week, sorry]

I'm working on some additions to nagios code as part of my current project.
If you'd like to see any/all of this submitted as patches for inclusion 
in your main code, let me know:

1. Addition of extinfo structures for hostgroup and servicegroup
    the config for them are [not surprisingly] hostgroupextinfo and
    servicegroupextinfo. I only need to use hostgroupextinfo myself
    so servicegroupextinfo code will not be well tested.
2. Additional target_frame field in all extinfo structures and in
    their config file that as you could guess is to be used to
    overwrite default "target=_blank" when using extinfo urls.
3. Addition of action_icon, action_icon_alt, notes_icon, notes_icon_alt
    fields for all extinfo structures that would cause different
    icon then default to be used when making url for extended action
    and notes. Also action_textinfo, notes_textinfo which are custom
    text description (in the future may extend so that if these texts
    are present they are added as links to top-left menu).
4. Support for having multiple hostextinfo and serviceextinfo for
    the same host/service. This would result is more then one icon
    being displayed. This is probably more controversial extinfo
    addition then the above as it changes expected error-condition
    behavior. Though for my purpose I don't have to, I'm implementing
    this with new global config directive that is required to enable
    such functionality.
5. New status types "HOST_DISABLED" and "SERVICE_DISABLED" that
    with status.cgi shows up as separate field in status totals
    and not counted in "All problems". This status is actived
    when you manually disable active checks, i.e. expect it to be
    down for considerable period or it maybe service that was not
    up in the first place (i.e. same services specified for hostgroup
    and not every host has all of them). For my scenario I wrote it
    so that disabling host would automatically cause all services for
    it to be seen as disabled (even if you did not actually disable
    them). BTW - this addition I've had in my production nagios for
    several months now and have been porting patch from 2.1 to 2.2
    and now 2.3 code. If this is to be ported to your main code,
    most likely it would need to change and be separate action
    then just "disable active services".

Note that most of my current code additions are done like:
#ifdef SUPPORT_DISABLE_STATUS
  ..code
#iendif // SUPPORT_DISABLE_STATUS

For real patches to main code you probably want those ifdef gone but 
they could all be converted to regular 'if' checking that particular 
configuration is activated.

If people are interested I can have patch for all extinfo changes
ready end of this week (BTW _ I also rewritten most of add_hostextinfo
and add_serviceextinfo functions as well as free_extended_data function)
and DISABLE_STATUS is ready right now but I don't think in current
form (without separate action and without global config to enable it)
it should go in there.

-- 
William Leibzon
Elan Networks
william at elan.net




More information about the Developers mailing list