Hi Team ,
While trying to execute check_mssql plugin im getting below error .
[nagios@abc libexec]$ ./check_mssql -H xyz --username "username" --password "12345" --database CMSPROD --port 1433 --query "SELECT+CASE+%0D%0A++++++++WHEN+%28MAX%28A.Hours_Ago%29+%3E+4%29%0D%0A++++++++++++THEN+%27TRUE%27%0D%0A++++++++ELSE+%27FALSE%27%0D%0A++++++++END+AS+ALERT%0D%0AFROM+%28%0D%0A++++SELECT+d.name%0D%0A++++++++%2C+d.recovery_model_desc%0D%0A++++++++%2C+ISNULL%28MAX%28b.backup_finish_date%29%2C1%29+AS+backup_finish_date%0D%0A++++++++%2C+DATEDIFF%28hh%2C+ISNULL%28MAX%28b.backup_finish_date%29%2C1%29%2C+GETDATE%28%29%29+AS+Hours_Ago%0D%0A++++FROM+master.sys.databases+d%0D%0A++++LEFT+OUTER+JOIN+msdb..backupset+b%0D%0A++++++++ON+b.database_name+%3D+d.name%0D%0A++++++++++++AND+b.type+%3D+%27L%27%0D%0A++++WHERE+d.recovery_model+%3D+1%0D%0A++++GROUP+BY+d.name%0D%0A++++++++%2C+d.recovery_model_desc%0D%0A++++%29+AS+A%0D%0A" --decode --result "FALSE"
UNKNOWN: PDO MSSQL/DBLIB support is not installed on this server. Try adding packages php-pdo and php-mssql on rpm systems or php-sybase on deb systems.
[nagios@abc libexec]$ rpm -qa | grep php*
php-cli-7.2.24-1.module+el8.2.0+4601+7c76a223.x86_64 php-gd-7.2.24-1.module+el8.2.0+4601+7c76a223.x86_64 php-fpm-7.2.24-1.module+el8.2.0+4601+7c76a223.x86_64 php-mbstring-7.2.24-1.module+el8.2.0+4601+7c76a223.x86_64 libmspack-0.7-0.3.alpha.el8.4.x86_64
php-common-7.2.24-1.module+el8.2.0+4601+7c76a223.x86_64
php-process-7.2.24-1.module+el8.2.0+4601+7c76a223.x86_64
php-mysqlnd-7.2.24-1.module+el8.2.0+4601+7c76a223.x86_64
graphite2-1.3.10-10.el8.x86_64
php-json-7.2.24-1.module+el8.2.0+4601+7c76a223.x86_64
php-pdo-7.2.24-1.module+el8.2.0+4601+7c76a223.x86_64
php-pear-1.10.5-9.module+el8.1.0+3202+af5476b9.noarch
php-bcmath-7.2.24-1.module+el8.2.0+4601+7c76a223.x86_64
php-pecl-zip-1.15.3-1.module+el8+2561+1aca3413.x86_64
python3-cryptography-3.2.1-5.el8.x86_64
php-7.2.24-1.module+el8.2.0+4601+7c76a223.x86_64
php-xml-7.2.24-1.module+el8.2.0+4601+7c76a223.x86_64
php-devel-7.2.24-1.module+el8.2.0+4601+7c76a223.x86_64
Please let us know what needs to be installed .
check_mssql plugin
Re: check_mssql plugin
Our box is rhel 8 and is there some other package that needs to be installed .
Re: check_mssql plugin
It's interesting that php-mssql didn't get installed automatically. Go ahead and get that installed, and see if that fixes the issue.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: check_mssql plugin
Actually when i referred the document https://assets.nagios.com/downloads/nag ... ios-XI.pdf it has mentioned the installation of pymssql required on rhel 7 box .
Still we tried to execute the command and got below error. Is there any other command that needs to be installed for rhel 8 ?
You do not have the required permissions to view the files attached to this post.
Re: check_mssql plugin
Hi
Please install the following packages:
php-pgsql-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64
php-ldap-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64
php-xml-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64
php-imap-7.2.11-1.el8.x86_64
php-snmp-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64
php-odbc-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64
Then run:
/usr/local/nagios/libexec/check_mssql - h
and let me know the output.
Thank you
Please install the following packages:
php-pgsql-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64
php-ldap-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64
php-xml-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64
php-imap-7.2.11-1.el8.x86_64
php-snmp-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64
php-odbc-7.2.24-1.module_el8.2.0+313+b04d0a66.x86_64
Then run:
/usr/local/nagios/libexec/check_mssql - h
and let me know the output.
Thank you