When i first tried this script, it worked in the command line as user nagios, but when setup in nagios, I got "no output" for the Status Information. I modified the script so it would print the errorcode and by the command line, it would print 0, 1 or 2 depending on my warning/critical settings, but still, in nagios, I got "no output".
As a last straw, I recompiled nagios and now I"m getting "(Return code of 13 is out of bounds)" which, is some permission error I think. I've checked permissions, and I know it's actually executing the script, because if I chown to root.root the file, then I get "plugin not found".
So, since the plugin is executing, it's something in the script that differ's from the command line.
Anyone else try to use this plugin please, at least give it a quick try, it's easy to setup.
command_line /usr/local/nagios/libexec/check_smb_shares.pl -H $HOSTADDRESS$ -S $ARG1$ -U $ARG2$ -P $ARG3$ -D $ARG4$ -A $ARG5$ -w $ARG6$ -c $ARG7$
use generic-service ; Name of service template to use
process_perf_data 0 ; Process performance data