<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.0.10">
</HEAD>
<BODY>
There is also a plug-in for this type of situation<BR>
check_procs<BR>
use the --help to see the syntax.<BR>
<BR>
On Thu, 2005-01-13 at 13:59, Lewis Getschel wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE><FONT COLOR="#737373"><I>Other replies pointed toward checking web pages, or a tcp port. Here is 
my "plugin" that I run by calling nrpe. I need to check for the presence 
of 2 daemons for a process hence, 2 if's. I don't have a Warning state 
for this, it's either working or it's not. This seems to do it. (maybe 
not very elegantly, At the moment I can't remember WHY I piped it to 
head, I think that's a leftover from a previous version where I was 
checking for a combination of output from ps ??? )
FWIW
Lewis

----- cut here ----
#!/bin/sh 
if [ "`ps -ef | grep -v grep | /bin/grep nqsdaemon | /usr/bin/head -n 1 
| /bin/awk '{print $9}'`" == "nqsdaemon" ]
then
   if  [ "`ps -ef | grep -v grep | /bin/grep netdaemon | /usr/bin/head 
-n 1 | /bin/awk '{print $9}'`" == "netdaemon" ]
   then
      echo OK - NQS is running
      exit 0
   else
      echo CRITICAL - NQS netdaemon is NOT running
      exit 2
   fi
else
    echo CRITICAL - NQS nqsdaemon is NOT running
    exit 2
fi
---- cut here ----

S. H. wrote:

>Hi everyone,
>
>I was wondering how would I go about chekcing that JBoss or Tomcat or
>any other UNIX/Linux program are running using Nagios (ver 1.2)?
>Somehting to do with using NRPE? Sorry i'm a bit new to all this linux
>stuff.
>
>Thanx a alot.
>
>
>-------------------------------------------------------
>The SF.Net email is sponsored by: Beat the post-holiday blues
>Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
>It's fun and FREE -- well, almost....</FONT><A HREF="http://www.thinkgeek.com/sfshirt"><U>http://www.thinkgeek.com/sfshirt</U></A>
<FONT COLOR="#737373">>_______________________________________________
>Nagios-users mailing list
>Nagios-users@lists.sourceforge.net
></FONT><A HREF="https://lists.sourceforge.net/lists/listinfo/nagios-users"><U>https://lists.sourceforge.net/lists/listinfo/nagios-users</U></A>
<FONT COLOR="#737373">>::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
>::: Messages without supporting info will risk being sent to /dev/null
>
>  
></I></FONT></PRE>
</BLOCKQUOTE>
</BODY>
</HTML>