check_mssql_server - Server connection failed error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
gm_rajkumar
Posts: 187
Joined: Tue Feb 28, 2012 7:08 am
Location: CA, USA

check_mssql_server - Server connection failed error

Post 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.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: check_mssql_server - Server connection failed error

Post 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
Former Nagios Employee
clarkag
Posts: 4
Joined: Thu Apr 03, 2014 3:07 am

Re: check_mssql_server - Server connection failed error

Post by clarkag »

Thanks,,,, trying this.
Tony Clark
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: check_mssql_server - Server connection failed error

Post by mcapra »

Let us know what your results are :)
Former Nagios employee
https://www.mcapra.com/
Locked