Best Way to Catch Windows Reboots in Nagios with NSClient++

Anthony Montibello amontibello at gmail.com
Sat Jun 20 03:59:48 CEST 2009


The threshold testing of Uptime should be can be done by modifying check_nt
check_nc_net has this already included in it, and is compatible as a
replacement for check_nt.c
it is availible at: https://sourceforge.net/projects/nc-net/

TOny  (Author of NC_Net)

Change the Case Uptime to something like the following then recompile:

case CHECK_UPTIME:

asprintf(&send_buffer, "%s&3", req_password);

fetch_data (server_address, server_port, send_buffer);

uptime=strtoul(recv_buffer,NULL,10);

updays = uptime / 86400;

uphours = (uptime % 86400) / 3600;

upminutes = ((uptime % 86400) % 3600) / 60;

asprintf(&output_message,_("System Uptime - %u day(s) %u hour(s) %u
minute(s)"),updays,uphours, upminutes);

return_code=STATE_OK;

if( check_critical_value==TRUE && critical_value > updays )

return_code=STATE_CRITICAL;

else if ( check_warning_value==TRUE && warning_value > updays )

return_code=STATE_WARNING;

break;



On Fri, Jun 19, 2009 at 11:30 AM, Mat W <lmw94002 at hotmail.com> wrote:

> 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.
>
> I don't believe the bult-in UPTIME check supports thresholds but you could
> "wrap" it in some code to do it.
>
> --
> Mat W. - http://www.techadre.com
>
>
>
> > Date: Fri, 19 Jun 2009 09:40:43 -0400
> > From: dmorris at digitalmorris.com
> > To: nagios-users at lists.sourceforge.net
> > Subject: [Nagios-users] Best Way to Catch Windows Reboots in Nagios with
> NSClient++
>
> >
> > Anybody have a good way to Catch Windows Reboots in Nagios with
> NSClient++.
> > Some times nagios misses the reboot due to timing i think.
> >
> > -Derek
> >
> >
> ------------------------------------------------------------------------------
> > Crystal Reports - New Free Runtime and 30 Day Trial
> > Check out the new simplified licensing option that enables unlimited
> > royalty-free distribution of the report engine for externally facing
> > server and web deployment.
> > http://p.sf.net/sfu/businessobjects
> > _______________________________________________
> > Nagios-users mailing list
> > Nagios-users at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/nagios-users
> > ::: Please include Nagios version, plugin version (-v) and OS when
> reporting any issue.
> > ::: Messages without supporting info will risk being sent to /dev/null
>
> ------------------------------
> Microsoft brings you a new way to search the web. Try Bing™ now<http://www.bing.com/?form=MFEHPG&publ=WLHMTAG&crea=TEXT_MFEHPG_Core_tagline_try+bing_1x1>
>
>
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables unlimited
> royalty-free distribution of the report engine for externally facing
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when
> reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20090619/765a666f/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list