check jboss or tomcat are running

Michael Adams mykea at SES-Ins.COM
Wed Jan 12 20:31:16 CET 2005


 I am currently monitoring several Jrun servers on Solaris boxes by using
check_tcp and checking to see if the ports are responding.  You could also
use nrpe in conjunction with a 'ps -ef | grep' script for the process name.


------------------------------------
SES Insurance Services, Inc.
------------------------------------
Michael Adams
Senior Systems Network Administrator
michael.adams at ses-ins.com
------------------------------------  
-----Original Message-----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of Schmitz,
Carsten
Sent: Wednesday, January 12, 2005 8:38 AM
To: S. H.; nagios-users at lists.sourceforge.net
Subject: RE: [Nagios-users] check jboss or tomcat are running


Hi,


> 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)?

If JBoss and Tomcat display web pages (in my understanding they usually are)
you can use check_http to check those.

If not, and they run on the same machine as Nagios, you could easily make
your own plugin. A shell script that does something like "ps -ef | grep
<process_name>", checks the return code of grep (different return code if
lines found, or if no lines found, see "man grep") and does "exit 0" if
process found, or "exit 2" if not works for me. You can also count the
processes ( | wc -l  or such) and "exit 1" (warning) if the number of
running procs seems not right.

Define your script in misccommands.cfg and thats it - your very own plugin.

All this applies to Nagios 1.2, dunno about 2.0 but should be similar. Also,
there are probably existing plugins that do this. Also, when grepping in ps
you might need to append an "| grep -v grep" cause on some systems I find
the output sometimes includes the grep process itself.

If they run on a different machine, Google a bit, I'm sure someone has tried
to check processes running on different machines with Nagios before. There
might be a plugin or some sort.

Or, you could develop a way for your plugin to log into the remote machine
and check the process there - ssh can be configured with its key mechanism
to run from scripts without needing a password (like a trust relationship),
and ssh can run commands on remote boxes this way.

Hope this helps.

Cheers,

----------------------------------------------------------------------
Carsten Schmitz
AEGON N.V.
System Administrator 				               AEGONplein 50
Group Information Management			            2591TV The Hague
				 			             The
Netherlands
Phone: +31 (0)70 344 8308

   "Unix is not user unfriendly. It's just picky about its friends" 
----------------------------------------------------------------------





-----Original Message-----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net]On Behalf Of S. H.
Sent: Wednesday, January 12, 2005 1:12 AM
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] check jboss or tomcat are running


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


-------------------------------------------------------
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



-------------------------------------------------------
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