<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7036.0">
<TITLE>Intelligent way to apply MANY service dependancys?</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">Hi, I have been using Nagios for a long time but have just switched to Nagios v2.0b3 and I'm re-working my config files a little bit. A large portion of my monitoring is done via the NRPE plugins. And a large portion of the NRPE checks are common across all of the machines. So my structure is as follows…I have all of the Sun servers in a hostgroup SUN-Servers, I have definitions for about 8 common NRPE checks that are assigned to the SUN-Servers hostgroup. So far so good, with very little in the way of definitions I have 100's of checks defined. Now to my problem, I would like to define a service dependancy for all NRPE services to be dependant on one check_nrpe_daemon check. So when the daemon is down I don't receive multiple alerts for every NRPE check. So I'd like to get the equivalent of this:</FONT></P>
<P><FONT SIZE=2 FACE="Arial">define servicedependency{</FONT>
<BR> <FONT SIZE=2 FACE="Arial">dependent_host_name DBDEV</FONT>
<BR> <FONT SIZE=2 FACE="Arial">dependent_service_description / Root Slice</FONT>
<BR> <FONT SIZE=2 FACE="Arial">host_name DBDEV</FONT>
<BR> <FONT SIZE=2 FACE="Arial">service_description Check NRPE</FONT>
<BR> <FONT SIZE=2 FACE="Arial">inherits_parent 1</FONT>
<BR> <FONT SIZE=2 FACE="Arial">execution_failure_criteria o,w,u,c,p</FONT>
<BR> <FONT SIZE=2 FACE="Arial">notification_failure_criteria o,w,u,c,p</FONT>
<BR><FONT SIZE=2 FACE="Arial">}</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">For every common NRPE service for every host in the SUN-Servers group. Now if I use the SUN-Servers hostgroup in the servicedependency definition it makes every NRPE service dependant on EVERY host's NRPE Daemon…this obviously isn't what I want. The best solution I have to this problem is to NOT send notifications for UNKNOWN service checks for every NRPE check except the daemon check. But I'd like to know if there's a better way to apply service dependany's in this situation. Thanks in advance for any help.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">PS. Below I've included the relevant entries for one host/NRPE check definitions.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Ray,</FONT>
</P>
<BR>
<BR>
<BR>
<P><FONT SIZE=2 FACE="Arial">define service {</FONT>
<BR><FONT SIZE=2 FACE="Arial"> use generic-diskcheck</FONT>
<BR><FONT SIZE=2 FACE="Arial"> hostgroup_name SUN-Servers</FONT>
<BR><FONT SIZE=2 FACE="Arial"> service_description Check NRPE</FONT>
<BR><FONT SIZE=2 FACE="Arial"> check_command check_nrpe_daemon</FONT>
<BR><FONT SIZE=2 FACE="Arial">}</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">define service {</FONT>
<BR><FONT SIZE=2 FACE="Arial"> use generic-diskcheck</FONT>
<BR><FONT SIZE=2 FACE="Arial"> hostgroup_name SUN-Servers</FONT>
<BR><FONT SIZE=2 FACE="Arial"> service_description / Root Slice</FONT>
<BR><FONT SIZE=2 FACE="Arial"> check_command check_nrpe!check_disk1!</FONT>
<BR><FONT SIZE=2 FACE="Arial">}</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">define service{</FONT>
<BR><FONT SIZE=2 FACE="Arial"> name generic-diskcheck</FONT>
<BR><FONT SIZE=2 FACE="Arial"> use generic-service</FONT>
<BR><FONT SIZE=2 FACE="Arial"> is_volatile 0</FONT>
<BR><FONT SIZE=2 FACE="Arial"> check_period 24x7</FONT>
<BR><FONT SIZE=2 FACE="Arial"> max_check_attempts 3</FONT>
<BR><FONT SIZE=2 FACE="Arial"> normal_check_interval 10</FONT>
<BR><FONT SIZE=2 FACE="Arial"> retry_check_interval 1</FONT>
<BR><FONT SIZE=2 FACE="Arial"> contact_groups office-admins</FONT>
<BR><FONT SIZE=2 FACE="Arial"> notification_interval 1440</FONT>
<BR><FONT SIZE=2 FACE="Arial"> notification_period 8x5</FONT>
<BR><FONT SIZE=2 FACE="Arial"> notification_options w,u,c,r</FONT>
<BR><FONT SIZE=2 FACE="Arial"> register 0</FONT>
<BR><FONT SIZE=2 FACE="Arial">}</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">define service{</FONT>
<BR><FONT SIZE=2 FACE="Arial"> name generic-service</FONT>
<BR><FONT SIZE=2 FACE="Arial"> active_checks_enabled 1</FONT>
<BR><FONT SIZE=2 FACE="Arial"> passive_checks_enabled 1</FONT>
<BR><FONT SIZE=2 FACE="Arial"> parallelize_check 1</FONT>
<BR><FONT SIZE=2 FACE="Arial"> obsess_over_service 1</FONT>
<BR><FONT SIZE=2 FACE="Arial"> check_freshness 0</FONT>
<BR><FONT SIZE=2 FACE="Arial"> notifications_enabled 1</FONT>
<BR><FONT SIZE=2 FACE="Arial"> event_handler_enabled 1</FONT>
<BR><FONT SIZE=2 FACE="Arial"> flap_detection_enabled 1</FONT>
<BR><FONT SIZE=2 FACE="Arial"> process_perf_data 1</FONT>
<BR><FONT SIZE=2 FACE="Arial"> retain_status_information 1</FONT>
<BR><FONT SIZE=2 FACE="Arial"> retain_nonstatus_information 1</FONT>
<BR><FONT SIZE=2 FACE="Arial"> register 0</FONT>
<BR><FONT SIZE=2 FACE="Arial"> }</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">define hostgroup{</FONT>
<BR><FONT SIZE=2 FACE="Arial"> hostgroup_name SUN-Servers</FONT>
<BR><FONT SIZE=2 FACE="Arial"> alias All SUN Solaris Servers</FONT>
<BR><FONT SIZE=2 FACE="Arial">}</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">define host{</FONT>
<BR><FONT SIZE=2 FACE="Arial"> name generic-dev-host</FONT>
<BR><FONT SIZE=2 FACE="Arial"> parents MFSW_SVR01</FONT>
<BR><FONT SIZE=2 FACE="Arial"> notifications_enabled 1</FONT>
<BR><FONT SIZE=2 FACE="Arial"> event_handler_enabled 1</FONT>
<BR><FONT SIZE=2 FACE="Arial"> flap_detection_enabled 1</FONT>
<BR><FONT SIZE=2 FACE="Arial"> process_perf_data 1</FONT>
<BR><FONT SIZE=2 FACE="Arial"> retain_status_information 1</FONT>
<BR><FONT SIZE=2 FACE="Arial"> retain_nonstatus_information 1</FONT>
<BR><FONT SIZE=2 FACE="Arial"> check_command check-host-alive</FONT>
<BR><FONT SIZE=2 FACE="Arial"> max_check_attempts 10</FONT>
<BR><FONT SIZE=2 FACE="Arial"> notification_interval 60</FONT>
<BR><FONT SIZE=2 FACE="Arial"> notification_period 8x5</FONT>
<BR><FONT SIZE=2 FACE="Arial"> notification_options d,u,r</FONT>
<BR><FONT SIZE=2 FACE="Arial"> hostgroups DEV-Servers,Office,SUN-Servers</FONT>
<BR><FONT SIZE=2 FACE="Arial"> contact_groups office-admins</FONT>
<BR><FONT SIZE=2 FACE="Arial"> register 0</FONT>
<BR><FONT SIZE=2 FACE="Arial"> }</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">define host {</FONT>
<BR><FONT SIZE=2 FACE="Arial"> use generic-dev-host</FONT>
<BR><FONT SIZE=2 FACE="Arial"> host_name DBDEV</FONT>
<BR><FONT SIZE=2 FACE="Arial"> alias Development ColdFusion & Oracle</FONT>
<BR><FONT SIZE=2 FACE="Arial"> address dbdev.mapfusion.com</FONT>
<BR><FONT SIZE=2 FACE="Arial">}</FONT>
</P>
<P><FONT FACE="Arial">_______________________________</FONT>
<BR><FONT FACE="Arial">Ray Ward</FONT>
<BR><FONT FACE="Arial">System Administrator</FONT>
<BR><FONT FACE="Arial">MapFusion Technologies Inc.</FONT>
<BR><A HREF="mailto:ray.ward@mapfusion.com"><U><FONT COLOR="#0000FF" FACE="Arial">mailto:ray.ward@mapfusion.com</FONT></U></A>
<BR><A HREF="http://www.mapfusion.com/"><U><FONT COLOR="#0000FF" FACE="Arial">http://www.mapfusion.com</FONT></U></A>
<BR><FONT FACE="Arial">_______________________________</FONT>
<BR><FONT FACE="Arial">NOTICE:</FONT>
<BR><FONT FACE="Arial">This message is intended only for the use of the individual or entity to which it is addressed; and it, including any attachments, may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any disclosure, dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please delete it from your system without copying or forwarding it and notify us by telephone (905-709-1925) or by return e-mail immediately. MapFusion Corp. and its affiliated companies do not accept responsibility or liability for any loss or damage arising in any way from your receipt or use or for any errors or omissions in the contents of this communication. </FONT></P>
<P><FONT FACE="Arial"> </FONT>
</P>
</BODY>
</HTML>