monitoring win2k processes

Michael.Wirtgen at miwi-dv.com Michael.Wirtgen at miwi-dv.com
Tue Jul 8 00:53:10 CEST 2003


Bryan

just my 2 cents, but of course I'm a little biased:

- SNMP might be an option if you already use this for other purposes, but it
can't resolve your "restart on failure" issue
- I might be paranoid, but wrapping something already buggy into a service
wrapper doesn't sound _too_ good to me, even if Russells point about
automatic restarting is valid.

- To answer your questions about nrpe_nt: 
  - Yes it runs on W2K, and I have also reports of running it on 2K3-Server
(In fact it was developed on W2K)
  - Yes, it's still labeled beta, as I don't have "enough" feedback gathered
to label it stable, even if I got some... 
  - All problem reports I received for the latest build (0.5b - available
approx. three weeks) boiled down to configuration issues.
    Currently I'm not aware of any open bugs, which could of course be
because no one reported it but just stopped looking at it... 

So, here's what I'd do:

- Get a copy of pstools from sysinternals [
http://www.sysinternals.com/ntw2k/freeware/pstools.shtml ]
- script something like this, and define as a nrpe_nt command:

######### checkandrestart.cmd start #########################
@echo off
setlocal
set PROCNAME=notepad
REM Assume state ok
set RETVAL=0
set RETSTR=%PROCNAME% running

REM check if process exists
pslist | find "%PROCNAME%" >NUL
if %ERRORLEVEL% EQU 0 GOTO SCRIPTEND
REM We need to restart, attempt restart and report WARNING
set RETVAL=1
set RETSTR=Restarted %PROCNAME%
echo restarting %PROCNAME% @ %DATE%-%TIME%>> %PROCNAME%-restart.log
start %PROCNAME%.exe

REM check if restart successful
pslist | find "%PROCNAME%" > NUL
if %ERRORLEVEL% EQU 0 GOTO SCRIPTEND
REM We failed to restart, report CRITICAL
set RETVAL=2
set RETSTR=Could not restart %PROCNAME%
echo Failed restarting %PROCNAME% @ %DATE%-%TIME%>> %PROCNAME%-restart.log

:SCRIPTEND
echo %RETSTR%
exit %RETVAL%

######### checkandrestart.cmd end ###########################

I just wrote this down, so please don't expect it to be fully tested, but
you should get the idea...

cheers
Michael

> -----Original Message-----
> From: Bryan Irvine [mailto:bryan.irvine at kingcountyjournal.com]
> Sent: Montag, 7. Juli 2003 22:21
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] monitoring win2k processes
> 
> 
> I have a windows 2000 box (ugh!) running a pretty critical app that is
> also very buggy.  The company obviously followed the "Fast, Reliable,
> and cheap, pick any two" track.  Anyway, the program dies 
> occasionally. 
> No errors no nothing it just vanishes.  It's as easy as just double
> clicking it's icon to get it back up and running.  Is there a way to
> check if the app is running, and if not either alert me or start the
> program?
> 
> I have checked the archives but the sourceforge search thing isn't
> working right now.  I think I'm supposed to use the nrpe_nt 
> but does it
> matter that I'm on 2k? and the software is listed as beta, is anyone
> else using it without any problems?
> 
> --Bryan
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_06
> 1203_01/01
> _______________________________________________
> 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
> 


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
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