Simplest plugin. Please help with incorporating into Nagios

Calvin Crutchfield ccrutchfield at incodewireless.com
Mon Apr 25 22:40:00 CEST 2005


Version:  Latest Nagios and plugins
OS: Solaris
Remote method: Check_by_ssh
Nagios along with check_by_ssh is working properly.

Question:
I need to execute a custom script via check_by_ssh on remote nodes.
I am a little confused about what it takes to use a script as a plugin.  I
know that Nagios uses the exit codes to determine OK WARN CRIT and I know it
needs to only have one line of output.

-But what else does a script need?
-What format is the one line of output?
-What do I need to do to the script to allow check_by_ssh to execute it?

Does it need to be compiled in anyway?  I will be using shell or perl
scripts.

Assume this script:  Simply gets a number and exits depending in its size.
-------------
#!/bin/sh
FILES=`ls |wc -l`

if [ $FILES -gt 100 ]
then
        exit 1
else
        exit 0
fi
----------------


I want to start simple then I can deduce what I need to do to incorporate my
larger scripts.  If this is simple please help  as I was not able to grasp
the plugins document very well.  If making your scripts into plugins is a
big deal, I would be willing to pay a reasonable fee for some consultation.

Thanks,

calvin



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
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