<div>The threshold testing of Uptime should be can be done by modifying check_nt</div>
<div>check_nc_net has this already included in it, and is compatible as a replacement for check_nt.c</div>
<div>it is availible at: <a href="https://sourceforge.net/projects/nc-net/">https://sourceforge.net/projects/nc-net/</a></div>
<div> </div>
<div>TOny (Author of NC_Net)</div>
<div> </div>
<div>Change the Case Uptime to something like the following then recompile:</div>
<div><font size="2">
<blockquote style="MARGIN-RIGHT: 0px" dir="ltr">
<p></p></blockquote></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">case</font></font><font size="2"> CHECK_UPTIME:
<p>asprintf(&send_buffer, </p></font><font color="#a31515" size="2"><font color="#a31515" size="2">"%s&3"</font></font><font size="2">, req_password);
<p>fetch_data (server_address, server_port, send_buffer);</p>
<p>uptime=strtoul(recv_buffer,NULL,10);</p>
<p>updays = uptime / 86400; </p>
<p>uphours = (uptime % 86400) / 3600;</p>
<p>upminutes = ((uptime % 86400) % 3600) / 60;</p>
<p>asprintf(&output_message,_(</p></font><font color="#a31515" size="2"><font color="#a31515" size="2">"System Uptime - %u day(s) %u hour(s) %u minute(s)"</font></font><font size="2">),updays,uphours, upminutes);
<p>return_code=STATE_OK;</p>
<p></p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">if</font></font><font size="2">( check_critical_value==TRUE && critical_value > updays )
<p>return_code=STATE_CRITICAL;</p>
<p></p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">else</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">if</font></font><font size="2"> ( check_warning_value==TRUE && warning_value > updays )
<p>return_code=STATE_WARNING; </p>
<p></p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">break</font></font><font size="2">;</font>
<div> </div>
<div> </div></div>
<div class="gmail_quote">On Fri, Jun 19, 2009 at 11:30 AM, Mat W <span dir="ltr"><<a href="mailto:lmw94002@hotmail.com">lmw94002@hotmail.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div>Are you opposed to adding NagEventLog with an NCSA service for the passive checks? You can write an event check filter in NagEventLog to look for the specific events in the Event logs.<br> <br>I don't believe the bult-in UPTIME check supports thresholds but you could "wrap" it in some code to do it.<br>
<br>-- <br>Mat W. - <a href="http://www.techadre.com/" target="_blank">http://www.techadre.com</a><br><br><br> <br>> Date: Fri, 19 Jun 2009 09:40:43 -0400<br>> From: <a href="mailto:dmorris@digitalmorris.com" target="_blank">dmorris@digitalmorris.com</a><br>
> To: <a href="mailto:nagios-users@lists.sourceforge.net" target="_blank">nagios-users@lists.sourceforge.net</a><br>> Subject: [Nagios-users] Best Way to Catch Windows Reboots in Nagios with NSClient++
<div>
<div></div>
<div class="h5"><br>> <br>> Anybody have a good way to Catch Windows Reboots in Nagios with NSClient++.<br>> Some times nagios misses the reboot due to timing i think.<br>> <br>> -Derek<br>> <br>> ------------------------------------------------------------------------------<br>
> Crystal Reports - New Free Runtime and 30 Day Trial<br>> Check out the new simplified licensing option that enables unlimited<br>> royalty-free distribution of the report engine for externally facing <br>> server and web deployment.<br>
> <a href="http://p.sf.net/sfu/businessobjects" target="_blank">http://p.sf.net/sfu/businessobjects</a><br>> _______________________________________________<br>> Nagios-users mailing list<br>> <a href="mailto:Nagios-users@lists.sourceforge.net" target="_blank">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 reporting any issue. <br>
> ::: Messages without supporting info will risk being sent to /dev/null<br><br></div></div>
<hr>
Microsoft brings you a new way to search the web. <a href="http://www.bing.com/?form=MFEHPG&publ=WLHMTAG&crea=TEXT_MFEHPG_Core_tagline_try+bing_1x1" target="_blank">Try Bing™ now</a></div><br>------------------------------------------------------------------------------<br>
Crystal Reports - New Free Runtime and 30 Day Trial<br>Check out the new simplified licensing option that enables unlimited<br>royalty-free distribution of the report engine for externally facing<br>server and web deployment.<br>
<a href="http://p.sf.net/sfu/businessobjects" target="_blank">http://p.sf.net/sfu/businessobjects</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 reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<br></blockquote></div><br>