Specific Nagios Plugins
Karl DeBisschop
karl at debisschop.net
Sun Feb 23 06:56:20 CET 2003
On Sat, 2003-02-22 at 23:52, Jan van den Berg wrote:
> I’ ve been assigned to look into the possibility of writing plugins
> for the Nagios system. Right now I am a bit confused of what is so
> Nagios specific of these plugins. Say that I write a plugin in C that
> checks a MySQL DB for a value and returns somethinig, than this is a
> self functioning piece of code which can run without Nagios. So my
> question is how are these plugins linked with Nagios what makes them
> specific Nagios plugins?
Yes, plugins are also standalone pieces of code. In fact, I run
check_http of the command line quite often. I also invoke it from
applications other than nagios.
To be used as a plugin by nagios, a program nust retrun 0 for OK, 1 for
WRANING, 2 for CRITICAL, and 3 for UNKNOWN. It should also return a
one-line textual description of status.
That's pretty much it.
Of course, the core plugins take pains to have standard syntax, to be
secuere, etc. Also, parts of the common files (includes, libraries) may
make it easier to write additional plugins. But those features are not
required for a plugin be useful at your site.
> Also I am confused; a plugin needs to be run from command line or is
> there a way to get the plugin integrated in the webinterface and have
> it run every 5 minutes?
That's what nagios does. Define the check command / service in the
nagios config files. Nagios invokes the progarm at the schedule you
resquest, in addtion to provideing a notification and escalation engine
and the integrayed web interface.
--
Karl
-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
_______________________________________________
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