Page 1 of 1

check_mssql could not connect

Posted: Fri Sep 16, 2016 8:05 am
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.

Re: check_mssql could not connect

Posted: Fri Sep 16, 2016 9:48 am
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?

Re: check_mssql could not connect

Posted: Fri Sep 16, 2016 9:52 am
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.

Re: check_mssql could not connect

Posted: Fri Sep 16, 2016 12:09 pm
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.

Re: check_mssql could not connect

Posted: Fri Sep 16, 2016 12:52 pm
by brdr
ok, thx folks! Please close.