I have hard time to make nagios running perl plugins properly.
My main pb is on check_sybase plugins which is coded in perl.
Everything looks fine on the command line :
nagios : ./check_sybase -U sa -p pass -S DSQUERY -D master --checktype=CONNECT
OK: Connect okay
nagios : echo $?
0
However running is as a service is a nightmare.
I run nagios 3.1.2 and plugins 1.4.11, check sybase is last version from nagios exchange on SLES10.
I configure nagios :
define service{
use generic-service
hostgroup_name sybase-servers
service_description SYBASE-CONN
check_command check_sybase_connection
notification_options n
contact_groups sybase-services-admins
}
define command {
command_name check_sybase_connection
command_line $USER1$/check_sybase -S DSQUERY -U sa -P PASS -D master --checktype=CONNECT
}
Nagios always give back CRITICAL with status info : (null).
Running the debug mode says :
[1267085879.192906] [016.0] [pid=12583] Attempting to run scheduled check of service ‘SYBASE-CONN’ on host ‘myhost.mydomain’: check options=0, latency=0.192000
[1267085879.193021] [016.0] [pid=12583] Checking service ‘SYBASE-CONN’ on host ‘myhost.mydomain’…
[1267085879.193088] [2320.2] [pid=12583] Raw Command Input: $USER1$/check_sybase -S DSQUERY -U sa -P PASS -D master --checktype=CONNECT
…
[1267085886.003640] [016.1] [pid=12583] HOST: myhost.mydomain, SERVICE: SYBASE-CONN, CHECK TYPE: Active, OPTIONS: 0, SCHEDULED: Yes, RESCHEDULE: Yes, EXITED OK: Yes, RETURN CODE: 2, OUTPUT: (null)
[1267085886.003684] [016.2] [pid=12583] Parsing check output…
[1267085886.003691] [016.2] [pid=12583] Short Output: (null)
Script has :
nagios: -epn
I tried append /usr/bin/perl btu same results.
I tried with another check_file plugins which looks like to have same behavious.
However checkwebinject.pl works fine (in $USER1$/webinject/ dir).
I am really getting nuts about that, anybody got any clue to help me make that runnig ?
check_mssql looks similar do anybody got one of them running fine ?
Thanks for any help.