Problem with check_mssql_health.inc.php

Hey.
I am new to Libre.
There is a problem with check_mssql_health.inc.php (It locates /usr/lib/nagios/plugins/):
Request: /usr/lib/nagios/plugins/check_mssql_health.inc.php -H 10.xxx.xxx.xxx --username=aaa --password=bbb
PHP Notice: Undefined variable: config in /usr/lib/nagios/plugins/check_mssql_health.inc.php on line 5
PHP Notice: Undefined variable: service in /usr/lib/nagios/plugins/check_mssql_health.inc.php on line 7
PHP Notice: Undefined variable: service in /usr/lib/nagios/plugins/check_mssql_health.inc.php on line 10
PHP Notice: Undefined variable: service in /usr/lib/nagios/plugins/check_mssql_health.inc.php on line 12

I didnt find any instruction about installing php plugins, so just put this script into nagios plugin folder,
I guess this is not right.

thanks

Hi,

You didnt say whats the problem. If the nagios plugin itself doesnt work, its not LibreNMS fault.

If in console works, it should also work in LibreNMS.

You should put the hostname “as is” in the IP Address field and --username=aaa ---password=bbb in the Parameters field.

Thanks for answer.
Problem is i dint know how to work with this php script.
php script is here: https://github.com/librenms/librenms/blob/master/includes/services/check_mssql_health.inc.php
also find this script in /librenms/includes/services

How to run it correctly?
In console i got same errors.

Ok. You need the nagios plugin for check_mssql.

The php file is for librenms and should be where you found it. Remove from the nagios plugin dir and download the correct one from nagios site

Ok.
1.downloaded …
2.removed …
Got another error
“Response: UNKNOWN: PDO MSSQL/DBLIB support is not installed on this server. Try adding packages php-pdo and php-mssql.”

php7.0-mssql was successfully installed before
smth missing in system

sudo apt install php-sybase php7.0-sybase

then works fine