<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<META content="MSHTML 6.00.2800.1522" name=GENERATOR></HEAD>
<BODY>
<DIV> </DIV>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
size=2>-----Original Message-----<BR><B>From:</B> Deborah Martin 
<BR><B>Sent:</B> 14 November 2005 17:25<BR><B>To:</B> 
'nagios-users@lists.sourceforge.net'<BR><B>Subject:</B> Using service 
dependencies <BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=002051717-14112005>Hi, 
</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=002051717-14112005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=002051717-14112005>I'm trying to use 
service dependencies as part of my nagios config. </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=002051717-14112005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=002051717-14112005>Basically, I want to 
do 2 checks, the primary check connects to a database. The secondary check is 
for RAM usage. </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=002051717-14112005>However, if the 
primary check fails I don't want nagios to try and attempt the secondary check 
as there is no point if </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=002051717-14112005>a system is down. I 
still want to see Nagios alert via the web front-end but not be notified via 
email when the primary check </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=002051717-14112005>is in a Unknown or 
Critical state. </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=002051717-14112005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=002051717-14112005>(The plugins on their own all work fine thru 
nagios as do they via the command-line. )</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=002051717-14112005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=002051717-14112005>I've defined below 
what I understand to be the way to configure dependencies but i'm not convinced 
its right even though </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=002051717-14112005>it works fine. Could 
someone take a look and just sanity check this for me and let me know if i'm 
doing the right/wrong thing ? </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=002051717-14112005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=002051717-14112005>thx</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=002051717-14112005>deborah 
</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=002051717-14112005>PS All of the lines 
below currently sit in my services.cfg until I know it works and then i'll split 
the dependency to a different cfg file. </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=002051717-14112005>Its easier to make 
changes that way! </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=002051717-14112005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=002051717-14112005></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2># device1 Primary check<BR>define 
service{<BR>        
use                     
generic-service            
; Name of host template to use</FONT></DIV>
<DIV><FONT face=Arial size=2>        
host_name               
ngcp4<BR>        
service_description     device1 DB 
Check<BR>        
is_volatile                     
0<BR>        
check_period                    
24x7<BR>        
max_check_attempts              
3<BR>        
normal_check_interval           
5<BR>        
retry_check_interval            
1<BR>        
contact_groups                  
linux-admins<BR>        
notification_interval           
20<BR>        
notification_period             
24x7<BR>        
notification_options            
u,c,r<BR>        
check_command           
check_wx2_conn!dummy$!device1<BR>        
}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2># device1 Secondary check<BR>define 
service{<BR>        
use                     
generic-service<BR>        
host_name               
ngcp4<BR>        
service_description     DB RAM checks for 
device1<BR>        
is_volatile             
0<BR>        
check_period            
24x7<BR>        
max_check_attempts      
3<BR>        
normal_check_interval   
5<BR>        
retry_check_interval    
1<BR>        
contact_groups          
linux-admins<BR>        
notification_interval   
5<BR>        
notification_period     
24x7<BR>        
notification_options    
u,w,c,r<BR>        
check_command           
check_wx2_ram!$HOSTALIAS$<BR>        
}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2># device1 dependency checks<BR>define 
servicedependency{<BR>        
host_name                       
ngcp4<BR>        
service_description             
DB RAM checks for device1<BR>        
dependent_host_name             
ngcp4<BR>        
dependent_service_description   device1 DB 
Check<BR>        
execution_failure_criteria      
u,c<BR>        
notification_failure_criteria   
u,c<BR>        }</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Regards,</FONT></DIV>
<DIV><FONT face=Arial size=2>Deborah</FONT><FONT face=Arial 
size=2></FONT></DIV>
<P STYLE="margin-top: 0pt;margin-bottom: 0pt;"><SPAN STYLE="FONT-FAMILY:'Arial';FONT-SIZE:8pt;">************************************************************************ </SPAN>
</P>
<P STYLE="margin-top: 0pt;margin-bottom: 0pt;"><SPAN STYLE="FONT-FAMILY:'Arial';FONT-SIZE:8pt;">This email and any files transmitted with it are confidential and </SPAN>
</P>
<P STYLE="margin-top: 0pt;margin-bottom: 0pt;"><SPAN STYLE="FONT-FAMILY:'Arial';FONT-SIZE:8pt;">intended solely for the use of the individual or entity to whom they </SPAN>
</P>
<P STYLE="margin-top: 0pt;margin-bottom: 0pt;"><SPAN STYLE="FONT-FAMILY:'Arial';FONT-SIZE:8pt;">are addressed. Any unauthorised distribution or copying is strictly  </SPAN>
</P>
<P STYLE="margin-top: 0pt;margin-bottom: 0pt;"><SPAN STYLE="FONT-FAMILY:'Arial';FONT-SIZE:8pt;">prohibited. </SPAN>
</P>
<P STYLE="margin-top: 0pt;margin-bottom: 0pt;"><SPAN STYLE="FONT-FAMILY:'Arial';FONT-SIZE:8pt;"> </SPAN>
</P>
<P STYLE="margin-top: 0pt;margin-bottom: 0pt;"><SPAN STYLE="FONT-FAMILY:'Arial';FONT-SIZE:8pt;">Whilst Kognitio Limited takes steps to prevent the transmission of  </SPAN>
</P>
<P STYLE="margin-top: 0pt;margin-bottom: 0pt;"><SPAN STYLE="FONT-FAMILY:'Arial';FONT-SIZE:8pt;">viruses via e-mail, we can not guarantee that any email or  </SPAN>
</P>
<P STYLE="margin-top: 0pt;margin-bottom: 0pt;"><SPAN STYLE="FONT-FAMILY:'Arial';FONT-SIZE:8pt;">attachment is free from computer viruses and you are strongly </SPAN>
</P>
<P STYLE="margin-top: 0pt;margin-bottom: 0pt;"><SPAN STYLE="FONT-FAMILY:'Arial';FONT-SIZE:8pt;">advised to undertake your own anti-virus precautions. </SPAN>
</P>
<P STYLE="margin-top: 0pt;margin-bottom: 0pt;"><SPAN STYLE="FONT-FAMILY:'Arial';FONT-SIZE:8pt;"> </SPAN>
</P>
<P STYLE="margin-top: 0pt;margin-bottom: 0pt;"><SPAN STYLE="FONT-FAMILY:'Arial';FONT-SIZE:8pt;">Kognitio grants no warranties regarding performance, </SPAN>
</P>
<P STYLE="margin-top: 0pt;margin-bottom: 0pt;"><SPAN STYLE="FONT-FAMILY:'Arial';FONT-SIZE:8pt;">use or quality of any e-mail or attachment and undertakes no  </SPAN>
</P>
<P STYLE="margin-top: 0pt;margin-bottom: 0pt;"><SPAN STYLE="FONT-FAMILY:'Arial';FONT-SIZE:8pt;">liability for loss or damage, howsoever caused. </SPAN>
</P>
<P STYLE="margin-top: 0pt;margin-bottom: 0pt;"><SPAN STYLE="FONT-FAMILY:'Arial';FONT-SIZE:8pt;">*********************************************************************** </SPAN> </P></BODY></HTML>