Page 1 of 1

check_mssql_server.php on remote host

Posted: Sat Jun 12, 2021 9:07 pm
by BanditBBS
Trying to run the newer check_mssql_server.php that comes with the latest XI on a remote(gearman like) host. I got:
freetds-libs-1.1.20-1.el7.x86_64
freetds-devel-1.1.20-1.el7.x86_64
freetds-1.1.20-1.el7.x86_64
installed but when running it I get the error:

Code: Select all

ERROR: [run_check] CRITICAL: Could not connect to odbc:Driver=FreeTDS;Server=10.1.16.110\main;dbname=main;charset=UTF8 as Nagios (Exception: SQLSTATE[01000] SQLDriverConnect: 0 [unixODBC][Driver Manager]Can't open lib 'FreeTDS' : file not found)
CRITICAL: Could not connect to odbc:Driver=FreeTDS;Server=10.1.16.110\main;dbname=main;charset=UTF8 as Nagios (Exception: SQLSTATE[01000] SQLDriverConnect: 0 [unixODBC][Driver Manager]Can't open lib 'FreeTDS' : file not found).
Any ideas what else I need to do to get this plugin working on a remote box?

Re: check_mssql_server.php on remote host

Posted: Mon Jun 14, 2021 5:06 pm
by gsmith
hey Bandit,

We are still looking at this. I am getting the same error as you, but with different wording:

Code: Select all

ERROR: [run_check] CRITICAL: Could not connect to odbc:Driver=FreeTDS;Server=192.168.XXX.XX;Port=1433;dbname=master;charset=UTF8 as gsmith (Exception: could not find driver)
It's like it knows the name of the driver, but not the location of the actual file.

I'll continue to dig tomorrow.

Thanks

Re: check_mssql_server.php on remote host

Posted: Tue Jun 15, 2021 10:22 am
by gsmith
Hi,

Please add the following:

Code: Select all

yum install php-odbc
yum install php-mssql
That should fix it.

Let me know either way.

Thanks

Re: check_mssql_server.php on remote host

Posted: Tue Jun 15, 2021 10:41 am
by BanditBBS
I was only missing php-mssql and I'm not getting further. Now getting adaptive server not found. Probably have to modify the freetds configuration. Will play around with it today.

Thanks

Re: check_mssql_server.php on remote host

Posted: Tue Jun 15, 2021 11:39 am
by gsmith
Do you have php-pdo installed?

Thx

Re: check_mssql_server.php on remote host

Posted: Tue Jun 15, 2021 11:41 am
by BanditBBS
Yeah, I do. It also could be a port closed on network. Waiting for my network team to respond to me. Thanks for digging in!

Re: check_mssql_server.php on remote host

Posted: Tue Jun 15, 2021 2:16 pm
by BanditBBS
Lock her up! My last remaining issue was a port being blocked. I'm all good now. Thanks for digging into it!