Stumped - check_mssql_server
Stumped - check_mssql_server
Hi,
I am stumped using check_mssql_server. Everything I do I get
CRITICAL:Unable to access SQL Server.
I've tried various flavours of
/usr/local/nagios/libexec/check_mssql_database.py -H "10.4.2.20" -U "sa" -P "password" -T "databasename" -p 1433 -I "LIVE" --datasize
on the console/commandline.
Ive tried ' around fields, Ive tried dynamic ports, variations on the instance. Some with instance, sometimes without. But nothing.
Can someone point me in the right direction?
I am stumped using check_mssql_server. Everything I do I get
CRITICAL:Unable to access SQL Server.
I've tried various flavours of
/usr/local/nagios/libexec/check_mssql_database.py -H "10.4.2.20" -U "sa" -P "password" -T "databasename" -p 1433 -I "LIVE" --datasize
on the console/commandline.
Ive tried ' around fields, Ive tried dynamic ports, variations on the instance. Some with instance, sometimes without. But nothing.
Can someone point me in the right direction?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Stumped - check_mssql_server
If the DB is using instances you would need to remove the port
Code: Select all
/usr/local/nagios/libexec/check_mssql_database.py -H "10.4.2.20" -U "sa" -P "password" -T "databasename" -I "LIVE" --datasizeRe: Stumped - check_mssql_server
I got via putty session
/usr/local/nagios/libexec/check_mssql_database.py -H "10.4.2.20" -U 'sa' -P 'password' -T 'SQLdmNewsRepository' -I LIVE --activetrans --warning 10 --critical 20
CRITICAL:Unable to access SQL Server.
(Service Check Timed Out) via the GUI... created from the MSSQL config wizard.
/usr/local/nagios/libexec/check_mssql_database.py -H "10.4.2.20" -U 'sa' -P 'password' -T 'SQLdmNewsRepository' -I LIVE --activetrans --warning 10 --critical 20
CRITICAL:Unable to access SQL Server.
(Service Check Timed Out) via the GUI... created from the MSSQL config wizard.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Stumped - check_mssql_server
Are you sure that the following are valid beyond a doubt?:
Username is actually
Password is actually
The table name is
And that lastly you need to have a valid instance name, and it's name is
The checks are case sensitive so be sure of that as well.
Username is actually
Code: Select all
saCode: Select all
passwordCode: Select all
SQLdmNewsRepositoryCode: Select all
LIVERe: Stumped - check_mssql_server
Yes, the username, password and database are correct as they are all written down on our Keepass Server Passwords List when we create the servers.
The instance is "live", I got the instance name using the SQL query on the server
I've also tried
MSSQL$LIVE
MSSQLSERVER$LIVE
SQL3\LIVE
LIVE
* This is a clustered SQL server by the way.
The instance is "live", I got the instance name using the SQL query on the server
Resulted in SQL3\Live (server\instance)select @@ServerName
I've also tried
MSSQL$LIVE
MSSQLSERVER$LIVE
SQL3\LIVE
LIVE
* This is a clustered SQL server by the way.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Stumped - check_mssql_server
If "Live" is the actual instance name, I believe it is case sensitive, have you tried it with the correct case set for each character?
Re: Stumped - check_mssql_server
Just checked.
Still no luck with this.
Ive also tried creating a new user, assigned db reader role to the database. still says
CRITICAL:Unable to access SQL Server.
I think its a permissions issue, is there anyway I can easily check?
Still no luck with this.
Ive also tried creating a new user, assigned db reader role to the database. still says
CRITICAL:Unable to access SQL Server.
I think its a permissions issue, is there anyway I can easily check?
Re: Stumped - check_mssql_server
Check the remote database systems logs. Do you see any "connection refused", "timeout" or access denied type errors?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Stumped - check_mssql_server
If you are sure that the username and the password are correct, you need to check the firewall settings next. Make sure port 1433 (unless you use a different one) is open. Can you telnet to port 1433 from your nagios server?
Code: Select all
telnet <mssql server IP> 1433Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Stumped - check_mssql_server
Used putty, set IP and port to 1433
Screen went black, no text appeared
Screen went black, no text appeared