Question

check_mssql plugin(nagios)

  • 20 October 2022
  • 9 replies
  • 661 views

Badge +3

Hello, dear colleagues,
When we run the mentioned check(check_mssql) we get the below error.

UNKNOWN: PDO MSSQL/DBLIB support is not installed on this server. Try adding packages php-pdo and php-mssql.

We have used the following commands.
sudo dnf install php-pdo
sudo dnf install php-mssql

However, in the 2nd command we get the following error.

No match for argument: php-mssql
Error: Unable to find a match: php-mssql


Note that Centreon is version 21.10 and the server OS is RedHat 8.3.


Please show your support.


9 replies

Userlevel 6
Badge +18

Hi @f.salamov why you don’t use the https://docs.centreon.com/pp/integrations/plugin-packs/procedures/applications-databases-mssql/?

I suppose you need to install unixODBC package

 

Badge +3

I am using the plugin package you mentioned.
But I need the check_mssql plugin to check the query execute time service.

Badge +3

This plugin(check_mssql) will be used with licensed centreon(21.10).

Do you have another offer for this check?

Userlevel 4
Badge +14

Hello,

Yes, centreon-plugins don't cover your need https://github.com/centreon/centreon-plugins/blob/master/database/mssql/plugin.pm#L34 .

Maybe the SQL or SQL-STRING mode but i don't know you have a result oriented like a Query-Time, Long-Queries, Slow-Queries.

About the nagios-plugins, is possible you have a better support with the Exchange Nagios https://exchange.nagios.org/directory/Plugins/Databases/SQLServer/check_mssql/details

Is it compatible with a RHEL 8 ?

Userlevel 6
Badge +19

Hin, 


Wath’s the query you want to run? Or exactly what does it return? We could probably make a dumb sql statement that just run the query without trying to get any of the result and just display the exec time.

 

Best

Badge +3
Service Status OK
Status information

OK: Query duration=0.144486 seconds. Query result=

Extended status information

 

Performance Data
query_duration=0.144486s;10;40'computed0'=;
Badge +3

Solution 
php56-php-mssql-5.6.40-34.el8.remi.x86_64.rpm - install
(http://rpms.remirepo.net/enterprise/8/remi/x86_64/)
yum install php56-php
yum install php56-php-mssql
vim check_mssql
/usr/bin/php → /bin/php56
 

Note: vi /etc/yum.repos.d/remi.repo
[remi]
Enabled =1 

Userlevel 4
Badge +14

Hello,

Great !

But, you install dependencies outdated who have possibly introduce security problem on your RHEL 8.x

PHP 5.6 is not supported since December 2018 https://www.php.net/releases/#5.6.40

It's the problem with Nagios and nagios-plugins you have many thing with a strong coverage but it's not really maintained..

I don't understand Nagios project, by exemple you could see the NRPE Agent, it's depreacated since the release of 4.0.1 but in July they released the 4.1.0 with a support of OpenSSL 3 for RHEL 9, Debian 11, Ubuntu 22 and others features https://github.com/NagiosEnterprises/nrpe/releases/tag/nrpe-4.1.0

Maybe you could open a Idea to ask an improvement of the SQL Server centreon-plugins to add a mode Query Time or similar.

Greg,

Badge +3

Thanks for the information.

Reply