check jboss or tomcat are running

Lewis Getschel lgetschel at denver.westerngeco.slb.com
Thu Jan 13 20:59:36 CET 2005


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....http://www.thinkgeek.com/sfshirt
>_______________________________________________
>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
>
>  
>

-- 
Lewis Getschel             | Today is done...
WesternGeco                |     Today was fun...
1625 Broadway              |         Tommorrow is another one.
Denver, CO 80202           |
Direct Phone - 303-389-4407|        -- Dr. Seuss --



-------------------------------------------------------
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....http://www.thinkgeek.com/sfshirt
_______________________________________________
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