Page 1 of 1
Reciving a connection error when setting up MSSQL checks
Posted: Fri Jun 05, 2015 1:42 pm
by jajenkins
Hello,
I am attempting to set up a MSSQL Server check through the wizard, and am receiving the following error after the check is set up:
Connection to the database failed for an unknown reason.
Any Ideas?
Re: Reciving a connection error when setting up MSSQL checks
Posted: Fri Jun 05, 2015 2:09 pm
by jdalrymple
Is your MSSQL server setup to allow external TCP/IP connections. Typically the default is to not allow those connections. If it is, can you verify connectivity from another application like sqlcmd or Microsoft SQL Management Studio?
Re: Reciving a connection error when setting up MSSQL checks
Posted: Fri Jun 05, 2015 2:15 pm
by jajenkins
i'm not sure, let me check with our SQL admin and ill let you know.
Re: Reciving a connection error when setting up MSSQL checks
Posted: Fri Jun 05, 2015 2:47 pm
by jajenkins
Just verified that external tcp/ip is allowed.
Re: Reciving a connection error when setting up MSSQL checks
Posted: Mon Jun 08, 2015 9:22 am
by jajenkins
@jdalrymple
I solved the problem.
I had to modify the actual Command:
check_xi_mssql_server i modified it from
$USER1$/check_mssql_server.py -H $HOSTADDRESS$: $ARG1$ to
$USER1$/check_mssql_server.py -H $HOSTADDRESS$:1433 $ARG1$
it's odd that in the Wizard that I was unable to create it like that to begin with, i was given this error:
Cannot specify port and instance.
Any idea why the Wizard would block that?
Re: Reciving a connection error when setting up MSSQL checks
Posted: Mon Jun 08, 2015 10:14 am
by jdalrymple
The commands are created in such a way so that they shouldn't have to be modified but still offer great flexibility in the wizard itself. I think in the case of our wizard you specify the port, or the instance, but not both. If you're using port 1433 that means (I think) you're not using the browser service, which is fine, but that means you don't need or want to name the instance.
Did you go through the wizard trying to specify only the port? Had you done that I think that the resulting service should have had the -p argument so no ":1433" would be needed:
Code: Select all
check_xi_mssql_server!-U 'foo' -P 'bar' -p 1433 --locktimeouts --warning 20 --critical 30
In this case expanding that out with the included command would be:
Code: Select all
$USER1$/check_mssql_server.py -H <windowsip> -U 'foo' -P 'bar' -p 1433 --locktimeouts --warning 20 --critical 30