Can't locate Switch.pm
Posted: Fri Dec 25, 2015 11:48 pm
I have a plugin that is a perl script and runs fine on the command line. if I do:
It returns
When I put in the command.cfg file:
and in my windows.cfg:
Return I get is
Is there a reason it's working differently in nagios than out?
Thanks.
JR
Code: Select all
./check_sfan.pl temp 192.168.0.2 public 2 "x>65" "x>67"Code: Select all
OK - 32°C |check_sfan;temp;2;32;32>65;32>67Code: Select all
# 'check_snmp' command definition
define command{
command_name check_cpu_temp
command_line $USER1$/check_sfan.pl $ARG1$ $HOSTADDRESS$ $ARG2$ $ARG3$ $ARG4$ $ARG5$
}
Code: Select all
define service{
use generic-service
host_name mediacenter
service_description Check CPU Temp
check_command check_cpu_temp!temp!public!2!"x>63"!"x>67"
}
Code: Select all
(No output on stdout) stderr: Can't locate Switch.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/local/nagios/libexec/check_sfan.pl line 37. Thanks.
JR