<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Ron<br>
<br>
I just tried this yesterday , I had a requirment to monitor a java
process on a windows box and return a critical alert if it has stopped
working. I used the following on as the nagios configuration , this
should be added to the object configuration file:<br>
<br>
define service{<br>
    use            generic-service<br>
    host_name        <br>
    service_description    Java<br>
    check_command        check_nt!PROCSTATE!-d SHOWALL -l java.exe<br>
    }<br>
<br>
This is working perfectly fine for me , Next step i am trying is to set
up a notification email if the process stops functioning. Hope this
helps.<br>
<br>
Thanks<br>
Jatin<br>
<br>
On 3/4/2010 6:57 AM, Ron Wilson wrote:
<blockquote
 cite="mid:7D85034F6BBBD540AF52C59CED3AA1E801C712FB@AKVXCH02.tvnzad.tvnz.co.nz"
 type="cite">
  <meta http-equiv="Content-Type"
 content="text/html; charset=ISO-8859-1">
  <meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
  <style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
  </style><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
  <div class="Section1">
  <p class="MsoNormal">I have NSclient on my servers and use NRPE to
access client.
On the whole it works fine but I have great difficulty detecting if a
windows
process is running or stopped. I have a java.exe that has to run in a
cmd
window.<o:p></o:p></p>
  <p class="MsoNormal">I need to know if that process stops for any
reason.<o:p></o:p></p>
  <p class="MsoNormal">Using command line from Nagios and with
Wordpad.exe as a
test I have tried using this<o:p></o:p></p>
  <p class="MsoNormal">./check_nrpe -H  server01 -p 5666 -c
 CheckProcState
-a wordpad.exe=running<o:p></o:p></p>
  <p class="MsoNormal"><o:p> </o:p></p>
  <p class="MsoNormal">I get All processes running regardless if
Wordpad is open or
not.<o:p></o:p></p>
  <p class="MsoNormal">I have read the manual and tried the various
combinations
mentioned in there and it does not help.<o:p></o:p></p>
  <p class="MsoNormal">Can anyone please supply a command line for NRPE
that will
tell me when a windows process is running and when it is stopped I want
it to
return critical<o:p></o:p></p>
  <p class="MsoNormal"><o:p> </o:p></p>
  <p class="MsoNormal">Thanks<o:p></o:p></p>
  <div class="MsoNormal" style="text-align: center;" align="center"><span
 style="font-size: 12pt; font-family: "Times New Roman","serif";">
  <hr align="center" size="2" width="100%"></span></div>
  <p class="MsoNormal" style=""><span
 style="font-size: 12pt; font-family: "Times New Roman","serif";">--<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 12pt; font-family: "Times New Roman","serif";">Ron
Wilson<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 12pt; font-family: "Times New Roman","serif";">Systems
Engineer<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 12pt; font-family: "Times New Roman","serif";">Television
New
Zealand<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 12pt; font-family: "Times New Roman","serif";">P.O.
Box 3819<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 12pt; font-family: "Times New Roman","serif";">Auckland,
New
Zealand<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 12pt; font-family: "Times New Roman","serif";">Phone
649-916-7560<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><i><span
 style="font-size: 12pt; font-family: "Times New Roman","serif"; color: navy;">Evolution
is
a harsh mistress.</span></i><span
 style="font-size: 12pt; font-family: "Times New Roman","serif";"><o:p></o:p></span></p>
  <div class="MsoNormal" style="text-align: center;" align="center"><span
 style="font-size: 12pt; font-family: "Times New Roman","serif";">
  <hr align="center" size="2" width="100%"></span></div>
  </div>
  <pre>==========================================================
For more information on the Television New Zealand Group, visit us
online at tvnz.co.nz 
==========================================================
CAUTION:  This e-mail and any attachment(s) contain information that
is intended to be read only by the named recipient(s).  This information
is not to be used or stored by any other person and/or organisation.
  </pre>
  <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
<a class="moz-txt-link-freetext" href="http://p.sf.net/sfu/intel-sw-dev">http://p.sf.net/sfu/intel-sw-dev</a></pre>
  <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Nagios-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</a>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null</pre>
</blockquote>
</body>
</html>