check_mssql could not connect

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
brdr
Posts: 312
Joined: Mon Jun 02, 2014 12:49 pm

check_mssql could not connect

Post by brdr »

Hi Nagios Support Team,

We are using 5.2.2.

We are trying to use the check_mssql plugin to run some basic query against one of our databases. With the username and password (its a service account) we can successfully run the query from the server. However, when we use the plugin from the Nagios server we get this issue:

CRITICAL: Could not connect to x.x.x.x as domain\username

The syntax is:
./check_mssql -H x.x.x.x --username domain\\username --password xxxxxx

As background:
I tried a different tool called 'tsql' (v7.x) from our Nagios Linux server. The syntax is:
tsql -S x.x.x.x -p 1433 -U domain\\username –P xxxxxxxxx -D our database

This tool replies back with output : "Login failed. The login is from untrusted domain and cannot be used with Windows authentication.

What am I missing?

Thank you.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: check_mssql could not connect

Post by rkennedy »

Is the Nagios machine part of the domain you're attempting to authenticate against?

Also, is it a domain account, or a local account on the MSSQL machine?
Former Nagios Employee
brdr
Posts: 312
Joined: Mon Jun 02, 2014 12:49 pm

Re: check_mssql could not connect

Post by brdr »

Sorry, I should have mentioned. Nagios is in same domain as the sql server I'm trying to connect to, and the account is a domain account.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: check_mssql could not connect

Post by mcapra »

I don't think check_mssql can use AD/domain accounts. Mostly due to limitations within the PHP function mssql_connect. You will likely need to create a user on the MSSQL server by hand (via CREATE_USER) rather than use AD/domain credentials.
Former Nagios employee
https://www.mcapra.com/
brdr
Posts: 312
Joined: Mon Jun 02, 2014 12:49 pm

Re: check_mssql could not connect

Post by brdr »

ok, thx folks! Please close.
Locked