Obviously this lead me to believe that it's a permissions issue, but the script is owned by nagios and the permissions are set to 755. I was originally getting the "Check of service 'Overall Health' on host 'foobar.com' did not exit properly!" but I changed the enable_embedded_perl value to 0, which fixed that issue.
Here is the output of the commands.cfg file for this check
Code: Select all
define command{
command_name check_snmp_environment_fcx
command_line $USER1$/check_snmp_environment.pl -H $HOSTADDRESS$ -C public -T $ARG1$
}Code: Select all
define service{
use generic-service
host_name foobar.com
service_description Overall Health
check_command check_snmp_environment_fcx!brocadeFCX
normal_check_interval 5
retry_check_interval 1
}Code: Select all
[1426200429.367186] [2048.1] [pid=14642] **** BEGIN MACRO PROCESSING ***********
[1426200429.367196] [2048.1] [pid=14642] Processing: '$USER1$/check_snmp_environment.pl -H $HOSTADDRESS$ -C public -T $ARG1$'
[1426200429.367222] [2048.1] [pid=14642] Done. Final output: '/usr/lib64/nagios/plugins/check_snmp_environment.pl -H 192.168.1.10 -C public -T brocadeFCX'
[1426200429.367233] [2048.1] [pid=14642] **** END MACRO PROCESSING *************Code: Select all
[root@nagios ~]# /usr/lib64/nagios/plugins/check_snmp_environment.pl -H 192.168.1.10 -C public -T brocadeFCX
PS 1 (Power supply 1 (NA - AC - Regular) present, status ok): OK; PS 2 (Power supply 2 (NA - AC - Regular) present, status ok): OK;
PS 1-1 (Power supply 1): OK; PS 2-1 (Power supply 2): OK; PS 1-2 (Power supply 1): OK; PS 2-2 (Power supply 2): OK; PS 1-3 (Power supply 1): OK; PS 2-3 (Power supply 2): OK;
Fan 1 (1): OK; Fan 2 (2): OK;
Fan 1 (1): OK; Fan 2 (2): OK;
Fan 1 (1): OK; Fan 2 (2): OK;
Chassis temperature of 43.5?C: OK;
Chassis unit temperature of 43.5?C: OK;
Management module: CPU temperature of 60.5?C: OK;
Management module: MAC 1 temperature of 43.5?C: OK;
Management module: CPU temperature of 63?C: OK;
Management module: MAC 1 temperature of 44?C: OK;
Management module: CPU temperature of 66?C: OK;
Management module: MAC 1 temperature of 46?C: OK;
Module 1-1 (ICX6610-48P POE 48-port Management Module): Module status: OK; Redundant status: OK (active);
Module 1-2 (ICX6610-QSFP 10-port 160G Module): Module status: OK; Redundant status: OK (other);
Module 1-3 (ICX6610-8-port Dual Mode(SFP/SFP+) Module): Module status: OK; Redundant status: OK (other);
Module 2-1 (ICX6610-48P POE 48-port Management Module): Module status: OK; Redundant status: OK (standby);
Module 2-2 (ICX6610-QSFP 10-port 160G Module): Module status: OK; Redundant status: OK (other);
Module 2-3 (ICX6610-8-port Dual Mode(SFP/SFP+) Module): Module status: OK; Redundant status: OK (other);
Module 3-1 (ICX6610-48P POE 48-port Management Module): Module status: OK; Redundant status: OK (other);
Module 3-2 (ICX6610-QSFP 10-port 160G Module): Module status: OK; Redundant status: OK (other);
Module 3-3 (ICX6610-8-port Dual Mode(SFP/SFP+) Module): Module status: OK; Redundant status: OK (other);
all OK
[root@nagios ~]# echo $?
0