<br><br><div class="gmail_quote">On Jan 25, 2008 12:06 AM, Andreas Ericsson <<a href="mailto:ae@op5.se">ae@op5.se</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">Mark Eisenblaetter wrote:<br>> On Jan 16, 2008 10:38 AM, Mark Eisenblaetter <<a href="mailto:mark.eisenblaetter@gmail.com">mark.eisenblaetter@gmail.com</a>><br>> wrote:<br>>
<br>>> Hi,<br>>><br>>> On Jan 16, 2008 10:07 AM, Andreas Ericsson <<a href="mailto:ae@op5.se">ae@op5.se</a>> wrote:<br>>><br>>>> Please don't top-post. It makes it hard to follow the discussion,
<br>>>> especially when you're top-posting to an answer that wasn't top-<br>>>> posted. Anyways...<br>>>><br>>>> Mark Eisenblaetter wrote:<br>>>>> Hi,<br>>>>> sorry for the latye replay,
<br>>>>><br>>>>> Then I will have to much templates, because i will need for every<br>>>>> kombination of args a new template.<br>>>>><br>>>>> For example by check_http I will need a template vor every
<br>>>> website/service i<br>>>>> want to check or for every disk with diffrend warning and Critival<br>>>>> threshosld.<br>>>>><br>>>>> Thats not so practicable.<br>
>>>><br>>>> Originally you wrote:<br>>>>>>> so it would be great if i can say in the template use the<br>>>> check_command<br>>>>>>> (check_dummy) defined in the template and not that defined in the
<br>>>> Host.<br>>>> To which I replied:<br>>>>>> That's what not setting anything in the object itself is for. If you<br>>>> don't<br>>>>>> have a check_command in the host object, it will use the one from the
<br>>>>>> template.<br>>>>>><br>>>> In other words, if you want a particular object to inherit the value<br>>>> from<br>>>> the template, simply don't set that value in the object. There was no
<br>>>> other question-like statement in your original mail.<br>>>><br>>> Ok, then my first mail was not so clear I hoped.<br>>><br>>> I was thinking of that as a new feature, to minimize the templatework.
<br>>><br>>><br>> Ok it seems that i am the only one that would like this feature.<br>><br>> Or do i miss one way to handle that situation without having a template for<br>> nearly every check?<br>
><br><br></div></div>You still have not clarified your original email. Only discovered that it's<br>not clear enough. If you can manage that, I'm sure there's already a solution<br>in Nagios for you.<br><div>
<div></div><div class="Wj3C7c"><br>--<br>Andreas Ericsson                   <a href="mailto:andreas.ericsson@op5.se">andreas.ericsson@op5.se</a><br>OP5 AB                             <a href="http://www.op5.se" target="_blank">
www.op5.se</a><br>Tel: +46 8-230225                  Fax: +46 8-230231<br><br>-------------------------------------------------------------------------<br>This SF.net email is sponsored by: Microsoft<br>Defy all challenges. Microsoft(R) Visual Studio 2008.
<br><a href="http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/" target="_blank">http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/</a><br>_______________________________________________<br>Nagios-devel mailing list
<br><a href="mailto:Nagios-devel@lists.sourceforge.net">Nagios-devel@lists.sourceforge.net</a><br><a href="https://lists.sourceforge.net/lists/listinfo/nagios-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-devel
</a><br></div></div></blockquote></div><br>Hi Andreas,<br><br>i know that if i don't define an command in the f.e. service definition that nagios will use the on in the template.<br><br>I started to generate a service definition und two templates one for the master and one for the slave.
<br><br>Here are an exaple:<br><br>define service{<br>        use                             freschness-20min,GL-Tcoder-Active-Service,pnp<br>        host_name                       gl-tcoder-sw<br>        servicegroups                   interface
<br>        service_description             Port1<br>         check_command                    check_mb_snmp_int!1<br>        }<br><br>Master Template, template pnp and freschness is only to set the checkfreschness and extinfo on the Master server and on the slave they are empty
<br><br>define service{<br>    register                        0<br>    name                            GL-Tcoder-Active-Service<br>    active_checks_enabled           0<br>    check_period                    24x7<br>    max_check_attempts              3
<br>    normal_check_interval           5<br>    retry_check_interval            1    <br>    passive_checks_enabled          1<br>    obsess_over_service             0<br>    check_freshness                 0<br>    event_handler_enabled           0
<br>    notifications_enabled           1<br>    notification_interval           120<br>    notification_period             24x7<br>    notification_options            w,u,c,r,f<br>    contact_groups                  rss,streaming
<br>}<br><br>Slave Template<br><br>define service{<br>    register                        0<br>    name                            GL-Tcoder-Active-Service<br>    active_checks_enabled           1<br>    check_period                    24x7
<br>    max_check_attempts              3<br>    normal_check_interval           5<br>    retry_check_interval            1    <br>    passive_checks_enabled          0<br>    obsess_over_service             1<br>    check_freshness                 0
<br>    event_handler_enabled           0<br>    notifications_enabled           0<br>    notification_interval           120<br>    notification_period             24x7<br>    notification_options            w,u,c,r,f<br>
    contact_groups                  rss,streaming,bereitschaft<br>}<br><br><br>you can see that i am only change the definition from active on the slave to passiv an the master. With the problme on the master if he is trying to check freschness that he will try the interface check.
<br><br>If i want to use the check_dummy an the main server i have to move thec checkcommand in the templet definition. So that i can define on the slave template the snmpcheck and on the master template the check_dummy.<br>
<br>wenn i will do it that way i have to generate for every interface i want to check one template. I think in my case it would be nearly 150 templates for diffrent plugins and args.<br><br>my intention is now to write it taht way but in the master template i will define an checkcommand with check_dummy so that i don't need the additional templates.
<br><br>in addition i want to try to have a minimum of definition that are uniq on the slaves. In my setup it only the templates ans host- and service- groups the rest i kan use 1to1 from the Master and it will be easier to sync the config.
<br><br>In the meentime i will try to go throuh the source code and look if i'm able  to  make a patch for this behavior but my C is a lot worther then my english.<br><br>I hope this helps because i don't know ta way o describe it better.
<br><br>Mark<br><br><br><br><br><br>