Chris,<div><br></div><div>Thanks for the detailed info. I had gone through the inheritance documentation you'd listed below, but I didn't put the facts together that I can mix my host template with my service template such that I can have a host's notification settings apply to a service. I had been trying to figure out how to merge the two since I want the service checks associated with my development hosts to take on the host notifications. I'll have to go back and re-evaluate this and see if I can get this working. If so, I agree, it will cut down on the number of templates and areas I have to define notifications.</div>
<div><br>Ken<br><br><div class="gmail_quote">On Mon, Mar 23, 2009 at 1:27 PM, Chris Beattie <span dir="ltr"><<a href="mailto:cbeattie@geninfo.com">cbeattie@geninfo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">Ken Netzorg wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Having read the documentation and doing some pondering, I am looking to break my service monitoring into two notification trees: Production and Development. That way, I am not bothered by development services alerting off hours and only get production notifications off hours. (If there is a better way to set this up, I'm open to suggestions.) <br>

</blockquote>
<br></div>
Service checks can inherit their notification period from their associated host object.  I set up my host templates for my dev and production servers with different notification periods, but I can use the same service templates for both since I haven't got a notification period defined in my service template..  The production server host template can notify 24x7, but the dev server host template is limitited to notifying during work hours.  The check period is 24x7 for both types of hosts, so Nagios always knows what's going on, even if it isn't saying anything about it.<br>

<br>
Services can also inherit their contacts from their associated hosts, so my prod host template includes a pager contact group that my dev host template does not.<div class="im"><br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
     name     production_client_version<br>
     use      production_service,w_client_version          # Merge the Production definition with the service command<br>
}<br>
<br>
I keep getting an error when validating the configuration (nagios -v nagios.cfg) that the w_client_version is a duplicate within the config files and I have searched for it only finding it in one location.<br>
</blockquote>
<br></div>
I haven't tried referencing two templates in a definition before, so I can't tell you if that works or not.  My instinct is to try it with just one template and see if the error goes away.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Can the check_command only be defined at the lowest level? Is this a valid configuration or are there better examples of separating development alerts from production alerts?<br>
</blockquote>
<br></div>
You can set the check_command in the service template and/or the service definition.  Anything you set in the service definition that's already been set in the service template will override the template's settings.<br>

<br>
For example, I have an SSL-enabled site service template defined to use / as its URL (my standard_service template has other things defined):<br>
<br>
define service {<br>
        use             standard_service<br>
        name            SSL Site<br>
        check_command   check_ssl_site!/<br>
        notes           blah blah blah<br>
        register        0<br>
}<br>
<br>
For a host where I want to check /, all I need is:<br>
<br>
define service {<br>
        use             SSL Site<br>
        host_name       foo<br>
}<br>
<br>
But for a host where I want to check a different URL, I use:<br>
<br>
define service {<br>
        use             SSL Site<br>
        host_name       different-foo<br>
        check_command   check_ssl_site!/foo/bar/bat.asp<br>
}<br>
<br>
The second one is still inheriting everything except the check_command from the SSL Site template.<br>
<br>
However, I think the answer to splitting up your dev and prod service types is just letting them inherit the notification period from the host.  You'll have half the service templates to manage if you can do that.<br>

<br>
Look for "implied inheritance" on this page:<br>
<a href="http://nagios.sourceforge.net/docs/3_0/objectinheritance.html" target="_blank">http://nagios.sourceforge.net/docs/3_0/objectinheritance.html</a><br><font color="#888888">
<br>
-- <br>
Chris Beattie<br>
<br>
Nothing in this message is intended to make or accept and offer or to form a contract, except that an attachment that is an image of a contract bearing the signature of an officer of our company may be or become a contract. This message (including any attachments) is intended only for the use of the individual or entity to whom it is addressed. It may contain information that is non-public, proprietary, privileged, confidential, and exempt from disclosure under applicable law or may constitute as attorney work product. If you are not the intended recipient, we hereby notify you that any use, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this message in error, please notify us immediately by telephone and delete this message immediately.<br>

<br>
Thank you.<br>
</font></blockquote></div><br></div>