[Nagiosplug-devel] plugins in java

Thomas Guyot-Sionnest dermoth at aei.ca
Wed Apr 2 14:46:40 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/04/08 08:28 AM, jimmy.mathew1 at wipro.com wrote:
> 
> Hi
> 
> Is it possible to write nagios pugin in java
> 
> I tried to execute a shell script as nagios pugin that executes a java
> program
> 
> That script can be executed successfully in a particularly
> directory(/home/jj/slof/release/slomonitor)
> 
> But when i try to execute that script as a nagios plugin it gives java
> exception (java.lang.NoClassDefFoundError).
> 
> I have defined the command for this plugin in commands.cfg with
> command_line as
> /home/jj/slof/release/slomonitor/xen_availb.sh where xen_availb.sh is
> the name of the script

You should be able to make it working... Make sure you don't rely on
environment variables or being started in a specific directory. Also
make sure the process doesn't require special privileges... check if you
can run it as your Nagios user...

Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH84Aw6dZ+Kt5BchYRApdQAKCBpyzg92iLm1iJRjRLD9yTvYT60ACfaNsP
MNqGLKmZORAWZY+wMuv7YTE=
=DIix
-----END PGP SIGNATURE-----




More information about the Devel mailing list