[PATCH] new feature: automatic services for hosts

Ignacio Goyret igoyret at alcatel-lucent.com
Wed Nov 19 05:42:23 CET 2008


Hi all,
The attached patch is something that I've been using for a while
without problems. Of course, all appropriate disclaimers apply.

What does it do?

The patch adds a new directive "services" to the "host" definitions.
This new directive lists one or more "service" templates which
are used to automatically create "service" definitions for
the host.

The following sequence:

    define host{
        host_name         bogus
        address           192.168.1.254
        services          template-check-disk-sda
        ...
    }

is exactly equivalent to the following sequence:

    define host{
        host_name         bogus
        address           192.168.1.254
        ...
    }
    define service {
        host_name         bogus
        use               template-check-disk-sda
    }

I don't particularly like the location where the automatically
created services are instantiated. If someone has a better idea,
including how to deal with host templates, I'm all ears.
May be it could be handled better as an step before resolving.

Enjoy!
-Ignacio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nagios-cvs-auto-services.u
Type: application/octet-stream
Size: 6573 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20081118/39ec6134/attachment.obj>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list