Contact Template Not Working?
Paul L. Allen
pla at softflare.com
Mon Apr 19 23:50:28 CEST 2004
Mueller, Karl writes:
> It's your lucky day.
Woohoo! I'm gonna get laid? :)
> The trick, as with all templated objects, is to have the "name" entry,
> which is the template name you inherit from. I just checked the nagios
> source code, and it appears to handle templated check_commands.
>
> In other words, you have your "standard" service:
>
> Define service {
> name blah_service_template
> service_description foofoo
> check_command XXXX
> ...
> }
>
> (this is an actual service object, so register 0 is not used)
>
> define service {
> service_description foofoo
> check_command YYYYY
> use blah_service_template
> ...
> }
Yeah, that's what I did. Only difference is that I had a template
that inherited from a template. I.e., generic_template is inherited
by various other templates, and specific service instances inherit from
the appropriate other templates.
> Alternately, you can have a single master pure "template" that the
> others inherit from, missing the check_command entry.
That's how I ended up doing it, not from choice but because that was all
that worked for me. Back when I was using check_by_ssh for remote
checks, that was particularly annoying because of the size of a
check_by_ssh check command. I want inheritence. Which is strange,
because I generally hate OOP, but for Nagios it makes sense.
--
Paul Allen
Softflare Support
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
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