convert java code to nagios plugin?

Carroll, Jim P [Contractor] jcarro10 at sprintspectrum.com
Tue Jan 7 19:50:24 CET 2003


One reference:

http://nagios.webdev.sprintspectrum.com/nagios/docs/plugins.html#howto

Hmm.  I know I've come across docs on how to write them before.  Off the top of my head:

- return a single line to stdout (<1024 bytes)
- use return codes of 0 (OK), 1 (warning) and 2 (critical)
- reference other plugins (eg, check_tcp --help) for examples

Returning a useful string will make looking at your Nagios web site nicer.  If you're writing a plugin to check a temperature sensor and all it returns is GOOD or BAD, that doesn't really tell you the current temperature.

Food for thought.

jc

> -----Original Message-----
> From: Peter Krzystofiak [mailto:pkrzystofiak at endeavors.com]
> Sent: Monday, January 06, 2003 7:42 PM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] convert java code to nagios plugin?
> 
> 
> I have code that when it is executed, it prints one line
> 
> example:
> 
> java -cp x.jar RunX   ====>  System.out.println will print a
> 
> "GOOD" or "BAD" depending on status of the thing that is 
> being monitored.
> 
> 
> how to i go about turning this into a nagios plugin?
> i've dug deep through tons of documentation and have 
> no idea how to convert this code into a plugin.  (I know that 
> there exists a mailing list for plugins)
> 
> Input is welcomed
> 
> Thank You,
> 
> Peter
> pkrzystofiak at endeavors.com
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> 


-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com




More information about the Users mailing list