check_mssql_server.php on remote host

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

check_mssql_server.php on remote host

Post 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?
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: check_mssql_server.php on remote host

Post 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
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: check_mssql_server.php on remote host

Post 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
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: check_mssql_server.php on remote host

Post 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
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: check_mssql_server.php on remote host

Post by gsmith »

Do you have php-pdo installed?

Thx
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: check_mssql_server.php on remote host

Post 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!
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: check_mssql_server.php on remote host

Post by BanditBBS »

Lock her up! My last remaining issue was a port being blocked. I'm all good now. Thanks for digging into it!
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Locked