check_mssql


#1

Trouble running the PHP-based check_mssql plugin…
When I first started, I didn’t have the PHP interpreter, so got that installed. Then the script header pointed to a different directory, so got that corrected. But still, problems persist…

[app04: /usr/local/nagios/libexec]$ sudo ./check_mssql sudo: unable to execute ./check_mssql: Permission denied
Header of the script:

[code]
[app04: /usr/local/nagios/libexec]$ cat check_mssql
#!/usr/lib/php5/

<?php ############################################################################ # # check_mssql - Checks various aspect of MSSQL servers # # Version 0.6.6, [OUTPUT TRUNCATED][/code] PHP location: [code][app04: /usr/local/nagios/libexec]$ whereis php5 php5: /etc/php5 /usr/lib/php5 /usr/share/php5[/code] Script permissions: [code][app04: /usr/local/nagios/libexec]$ ls -l |grep mssql -rwxr-xr-x 1 nagios nagios 11429 2009-01-13 14:51 check_mssql[/code] I think the problem is somehow with PHP path or permissions because when I change the header of the script to a non-existent directory, I get: [code]sudo: unable to execute ./check_mssql: No such file or directory[/code] But I'm clueless how to fix this. Any pointers appreciated!