Yes, i edited the extract of the config file<div><br><div>You wanted www1 to notify contact1, use the first service deinition</div><div>and for www2 to notify contact2, the second</div><div><br></div><div>like:</div><div><br>
</div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><div>define service{</div><div><span style="white-space: pre-wrap; "> </span>use generic-service</div>
<div><span style="white-space: pre-wrap; "> </span>host_name www1</div><div><span style="white-space: pre-wrap; "> </span>service_description HTTP</div><div><span style="white-space: pre-wrap; "> </span>check_command check_http</div>
<div><span style="white-space: pre-wrap; "> </span>is_volatile 0</div><div><span style="white-space: pre-wrap; "> </span>check_period 24x7</div><div><span style="white-space: pre-wrap; "> </span>max_check_attempts 2</div>
<div><span style="white-space: pre-wrap; "> </span>normal_check_interval 5</div><div><span style="white-space: pre-wrap; "> </span>retry_check_interval 5</div><div><span style="white-space: pre-wrap; "> </span>contacts nagiosadmin,nagiosadmin2,nagiosadmin3,nagiosadmin4</div>
<div><span style="white-space: pre-wrap; "> </span>notification_interval 0</div><div><span style="white-space: pre-wrap; "> </span>notification_period 24x7</div><div><span style="white-space: pre-wrap; "> </span>notification_options c,r,w,u,f</div>
<div><span style="white-space: pre-wrap; "> </span>notifications_enabled 1 </div><div><span style="white-space: pre-wrap; "> </span>}</div><div><br></div><div>define service{</div><div><span style="white-space: pre-wrap; "> </span>use generic-service</div>
<div><span style="white-space: pre-wrap; "> </span>host_name www2</div><div><span style="white-space: pre-wrap; "> </span>service_description HTTP</div><div><span style="white-space: pre-wrap; "> </span>check_command check_http</div>
<div><span style="white-space: pre-wrap; "> </span>is_volatile 0</div><div><span style="white-space: pre-wrap; "> </span>check_period 24x7</div><div><span style="white-space: pre-wrap; "> </span>max_check_attempts 2</div>
<div><span style="white-space: pre-wrap; "> </span>normal_check_interval 5</div><div><span style="white-space: pre-wrap; "> </span>retry_check_interval 5</div><div><span style="white-space: pre-wrap; "> </span>contacts fernando,steria</div>
<div><span style="white-space: pre-wrap; "> </span>notification_interval 0</div><div><span style="white-space: pre-wrap; "> </span>notification_period 24x7</div><div><span style="white-space: pre-wrap; "> </span>notification_options c,r,w,u,f</div>
<div><span style="white-space: pre-wrap; "> </span>notifications_enabled 1 </div><div><span style="white-space: pre-wrap; "> </span>}</div><div><br></div><div>I hope now it s more clear.</div><div>Jorge</div></span><br><div class="gmail_quote">
On Wed, Jul 28, 2010 at 10:14 AM, Mika Chu <span dir="ltr"><<a href="mailto:ledondo2000@gmail.com">ledondo2000@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello Jorge,<br>
If the http service on your www2 host down, I believe all of contacts<br>
will get the notification?<br>
<br>
Is it possible only let your fernando & steria get the notification,<br>
but we can use less define in .cfg file?<br>
<br>
2010/7/28, Jorge Gil <<a href="mailto:georgyboy@gmail.com">georgyboy@gmail.com</a>>:<br>
<div><div></div><div class="h5">> Dear,<br>
><br>
> I copy you a working example of my Nagios, just define two times the service<br>
> with different contacts -it will make it work different for warning<br>
> different administrators of different servers:<br>
><br>
> define service{<br>
> use generic-service<br>
> host_name www2<br>
> service_description HTTP<br>
> check_command check_http<br>
> is_volatile 0<br>
> check_period 24x7<br>
> max_check_attempts 2<br>
> normal_check_interval 5<br>
> retry_check_interval 5<br>
> contacts nagiosadmin,nagiosadmin2,nagiosadmin3,nagiosadmin4<br>
> notification_interval 0<br>
> notification_period 24x7<br>
> notification_options c,r,w,u,f<br>
> notifications_enabled 1<br>
> }<br>
><br>
> define service{<br>
> use generic-service<br>
> host_name www2<br>
> service_description HTTP<br>
> check_command check_http<br>
> is_volatile 0<br>
> check_period 24x7<br>
> max_check_attempts 2<br>
> normal_check_interval 5<br>
> retry_check_interval 5<br>
> contacts fernando,steria<br>
> notification_interval 0<br>
> notification_period 24x7<br>
> notification_options c,r,w,u,f<br>
> notifications_enabled 1<br>
> }<br>
><br>
> Kind regards,<br>
> Jorge<br>
><br>
> On Wed, Jul 28, 2010 at 9:51 AM, Mika Chu <<a href="mailto:ledondo2000@gmail.com">ledondo2000@gmail.com</a>> wrote:<br>
><br>
>> Dear,<br>
>><br>
>> I am a beginning user of nagios, and trying to find a convenient way<br>
>> to define different service contacts. For example this,<br>
>><br>
>> define service{<br>
>> name check_ssh<br>
>> use generic-service<br>
>> service_description SSH<br>
>> host_name mail,file,backup<br>
>> check_command check_ssh<br>
>> }<br>
>><br>
>> if the mail server ssh has problem, I want to notify user A. If file<br>
>> server ssh has prolem, I want to notify user B, and etc.<br>
>><br>
>> Please advice how to do that?<br>
>> Thanks a lot!<br>
>> --<br>
>> ---<br>
>> Mika Chu<br>
>><br>
>><br>
>> ------------------------------------------------------------------------------<br>
>> The Palm PDK Hot Apps Program offers developers who use the<br>
>> Plug-In Development Kit to bring their C/C++ apps to Palm for a share<br>
>> of $1 Million in cash or HP Products. Visit us here for more details:<br>
>> <a href="http://ad.doubleclick.net/clk;226879339;13503038;l" target="_blank">http://ad.doubleclick.net/clk;226879339;13503038;l</a>?<br>
>> <a href="http://clk.atdmt.com/CRS/go/247765532/direct/01/" target="_blank">http://clk.atdmt.com/CRS/go/247765532/direct/01/</a><br>
>> _______________________________________________<br>
>> Nagios-users mailing list<br>
>> <a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
>> <a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
>> ::: Please include Nagios version, plugin version (-v) and OS when<br>
>> reporting any issue.<br>
>> ::: Messages without supporting info will risk being sent to /dev/null<br>
>><br>
><br>
<br>
<br>
</div></div>--<br>
---<br>
<font color="#888888">Mika Chu<br>
</font></blockquote></div><br></div></div>