check jboss or tomcat are running

Alan Maxwell alan_maxwell at hilton.com
Thu Jan 13 21:29:50 CET 2005


There is also a plug-in for this type of situation
check_procs
use the --help to see the syntax.

On Thu, 2005-01-13 at 13:59, Lewis Getschel wrote:

> 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
> >
> >  
> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20050113/e2ee473d/attachment.html>


More information about the Users mailing list