Page 1 of 1

check_mssql_server - Server connection failed error

Posted: Mon Jun 27, 2016 7:49 pm
by gm_rajkumar
Team,

I am using MSSQL to check below service in Nagios XI got this error. please let me know what went wrong on this.

[centos@ip-10-0-0-118 libexec]$ ./check_mssql_server.py -H XX.XX.XX.XX -U 'sa' -P '$\$berg!ta@dm!n' -p 1434 --bufferhitratio --warning 1 --critical 5
SQL Server message 18456, severity 14, state 1, line 1:
Login failed for user 'sa'.
DB-Lib error message 18456, severity 14:
General SQL Server error: Check messages from the SQL Server
DB-Lib error message 20002, severity 9:
Adaptive Server connection failed

Regards,
Rajkumar M.

Re: check_mssql_server - Server connection failed error

Posted: Tue Jun 28, 2016 9:47 am
by rkennedy
It looks like the password is getting rejected from the Nagios side. What are you seeing on the error logs on the SQL side?

It could be the special characters in your password, try setting up a check and using the resource.cfg file to save $USER#$ as a variable for your password, and replace that in the service definition's check_command. Take a look at this document -
https://assets.nagios.com/downloads/nag ... Macros.pdf

Re: check_mssql_server - Server connection failed error

Posted: Thu Jun 30, 2016 2:32 pm
by clarkag
Thanks,,,, trying this.

Re: check_mssql_server - Server connection failed error

Posted: Thu Jun 30, 2016 2:34 pm
by mcapra
Let us know what your results are :)