<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Arial, Helvetica, sans-serif; font-size: 12pt; color: #000000'>Dan<br><br>Even for the same host dependencies you still need to define a host in the servicedependency definitions.<br>At the moment your servicedependency (the one you pasted here) is not associated with any host and hence the logic is not implemented on any host testing logic.<br><br>Assaf<br><br><hr id="zwchr"><div style="color: rgb(0, 0, 0); font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Daniel Wittenberg" <daniel.wittenberg.r0ko@statefarm.com><br><b>To: </b>"nagios-users@lists.sourceforge.net" <nagios-users@lists.sourceforge.net><br><b>Sent: </b>Thursday, 15 December, 2011 5:38:53 PM<br><b>Subject: </b>[Nagios-users] servicedependencies not working<br><br>



<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>

<font size="2" face="Calibri"><span style="font-size: 11pt;">
<div>I’ve started playing with making a bunch of dependencies and at first it appeared to be working, right now I’ve got a pretty basic test setup. I’ve added one service to be dependent on the other one, but it seems that the freshness might be mucking with
it.  Two services below:</div>
<div> </div>
<div><font face="Times New Roman"> </font></div>
<div><font size="2" face="Courier New"><span style="font-size: 10pt;">define service {</span></font></div>
<div><font size="2" face="Courier New"><span style="font-size: 10pt;">     service_description      base_log_checks</span></font></div>
<div><font size="2" face="Courier New"><span style="font-size: 10pt;">     <u>servicegroups</u>            base_service_group</span></font></div>
<div><font size="2" face="Courier New"><span style="font-size: 10pt;">     hostgroup_name           base_windows_2003</span></font></div>
<div><font size="2" face="Courier New"><span style="font-size: 10pt;">     use                      generic-passive-service</span></font></div>
<div><font size="2" face="Courier New"><span style="font-size: 10pt;">     check_freshness          1</span></font></div>
<div><font size="2" face="Courier New"><span style="font-size: 10pt;">     freshness_threshold      3600                </span></font></div>
<div><font size="2" face="Courier New"><span style="font-size: 10pt;">     check_command            service_is_</span></font></div>
<div><font size="2" face="Courier New"><span style="font-size: 10pt;">}</span></font></div>
<div><font face="Times New Roman"> </font></div>
<div><font size="2" face="Courier New"><span style="font-size: 10pt;">define service {</span></font></div>
<div><font size="2" face="Courier New"><span style="font-size: 10pt;">     service_description      nagios_cron</span></font></div>
<div><font size="2" face="Courier New"><span style="font-size: 10pt;">     servicegroups            base_service_group</span></font></div>
<div><font size="2" face="Courier New"><span style="font-size: 10pt;">     hostgroup_name           base_windows_2003</span></font></div>
<div><font size="2" face="Courier New"><span style="font-size: 10pt;">     use                      generic-passive-service</span></font></div>
<div><font size="2" face="Courier New"><span style="font-size: 10pt;">     check_freshness          1</span></font></div>
<div><font size="2" face="Courier New"><span style="font-size: 10pt;">     freshness_threshold      3000                </span></font></div>
<div><font size="2" face="Courier New"><span style="font-size: 10pt;">     check_command            service_is_stale    </span></font></div>
<div><font size="2" face="Courier New"><span style="font-size: 10pt;">}</span></font></div>
<div><font face="Times New Roman"> </font></div>
<div><font size="2" face="Courier New"><span style="font-size: 10pt;">define <u>servicedependency</u> {</span></font></div>
<div><font size="2" face="Courier New"><span style="font-size: 10pt;">    service_description             nagios_cron</span></font></div>
<div><font size="2" face="Courier New"><span style="font-size: 10pt;">    dependent_service_description   base_log_checks</span></font></div>
<div><font size="2" face="Courier New"><span style="font-size: 10pt;">    execution_failure_criteria      w,u,c</span></font></div>
<div><font size="2" face="Courier New"><span style="font-size: 10pt;">    notification_failure_criteria   w,u,c</span></font></div>
<div><font size="2" face="Courier New"><span style="font-size: 10pt;">    inherits_parent                 1</span></font></div>
<div><font size="2" face="Courier New"><span style="font-size: 10pt;">}</span></font></div>
<div><font face="Times New Roman"> </font></div>
<div>What appears to happen is that I kill nsclient so nagios_cron starts reporting “stale” at 3000 seconds,  and the same for base_log_checks shortly after.  Then about every hour I get more “stale” soft alerts, and then after the third try it goes to a HARD
alert and I still get a ticket, though I’m not sure why it’s even checking if execution should be disable when nagios_cron is in a warning state.  But not only does the active checks (service_is_stale) get executed but I’m also still getting notifications sent
after 3 attempts, so it doesn’t really appear to be doing anything.  Unfortunately right now these servers are so busy it’s hard to put them in debug mode.  Have I missed something obvious with these?</div>
<div><br>

Dan</div>
<div><font face="Times New Roman"> </font></div>
<div><font face="Times New Roman"> </font></div>
</span></font>
<br>------------------------------------------------------------------------------<br>10 Tips for Better Server Consolidation<br>Server virtualization is being driven by many needs.  <br>But none more important than the need to reduce IT complexity <br>while improving strategic productivity.  Learn More! <br>http://www.accelacomm.com/jaw/sdnl/114/51507609/<br>_______________________________________________<br>Nagios-users mailing list<br>Nagios-users@lists.sourceforge.net<br>https://lists.sourceforge.net/lists/listinfo/nagios-users<br>::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. <br>::: Messages without supporting info will risk being sent to /dev/null</div><br></div></body></html>