[Nagiosplug-devel] Help needed with simple BASH plugin - Nagiosgetting (null)

Bret Cason Bret_Cason at symantec.com
Mon May 24 21:05:44 CEST 2010

Maybe the command definition isn't passing an $ARG1$ value.
The associated service command should say something like ".... -a

-----Original Message-----
From: Alan Johnson [mailto:aj at okesit.net] 
Sent: Monday, May 24, 2010 11:27 AM
To: nagiosplug-devel at lists.sourceforge.net
Subject: [Nagiosplug-devel] Help needed with simple BASH plugin -
Nagiosgetting (null)

Hi everyone,

I am writing a plugin to be used internally to monitor the status of my
Amazon S3 backups.

Its very simple in that it telnets to a port on my backup server thats
backs up to S3, then either gets a 0,1 or 2 depending on exit code of
the S3 synchronisation.  That part work perfectly.

The problem is the plugin on the Nagios box.  If I run it from the
command line, I get everything as expected, plus the correct exit code.
When I run it in Nagios, I get (null) and thats it.

My Nagios plugin is:

STATUS=`/bin/nc $1 65530`
if [ "$STATUS" = "0" ] ;
		/bin/echo "OK: S3 synchronisation okay"
		exit 0
if [ "$STATUS" = "1" ] ;
                /bin/echo "OK: S3 synchronisation currently running"
                exit 1
if [ "$STATUS" = "2" ] ;
                /bin/echo "CRITICAL: S3 synchronisation failed"
                exit 2

Any ideas on what may be wrong?  Haven't seen any solution on other
lists that help.


Nagios Plugin Development Mailing List
Nagiosplug-devel at lists.sourceforge.net
Unsubscribe at
::: Please include plugins version (-v) and OS when reporting any issue.

::: Messages without supporting info will risk being sent to /dev/null

More information about the Devel mailing list