/usr/local/nagios/libexec/check_mssql_server.py -H server -U 'nagios' -P 'password' -I 'server' --time2connect --warning 1 --critical 5
Connection to the database failed for an unknown reason.
/usr/local/nagios/libexec/check_mssql_server.py -H server -U 'nagios' -P 'password' -I 'server' --time2connect --warning 1 --critical 5
Connection to the database failed for an unknown reason.
You should run:
/usr/local/nagios/libexec/check_mssql_server.py -H server -U 'nagios' -P 'password' -I 'Instance' --time2connect --warning 1 --critical 5
Connection to the database failed for an unknown reason.
To find out what are the instances installed on the server type "regedit" in the search bar, and hit "Enter". Then go to:
HKEY_LOCAL_MACHINE -> SOFTWARE -> MICROSOFT -> MICROSOFT SQL SERVER -> INSTALLEDINSTANCES
double-click on "InstalledInstances" on the right-hand side to view them.
Instead of using an instance, you can try using a port number ("-p"). Use one or the other - can't use both. Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
/usr/local/nagios/libexec/check_mssql_server.py -H server -U 'nagios' -P 'password' -I 'server' --time2connect --warning 1 --critical 5
Connection to the database failed for an unknown reason.
You should run:
/usr/local/nagios/libexec/check_mssql_server.py -H server -U 'nagios' -P 'password' -I 'Instance' --time2connect --warning 1 --critical 5
Connection to the database failed for an unknown reason.
To find out what are the instances installed on the server type "regedit" in the search bar, and hit "Enter". Then go to:
HKEY_LOCAL_MACHINE -> SOFTWARE -> MICROSOFT -> MICROSOFT SQL SERVER -> INSTALLEDINSTANCES
double-click on "InstalledInstances" on the right-hand side to view them.
Instead of using an instance, you can try using a port number ("-p"). Use one or the other - can't use both. Hope this helps.
/usr/local/nagios/libexec/check_mssql_server.py -H server -U 'nagios' -P 'password' -p 1433 --time2connect --warning 1 --critical 5
SQL Server message 18456, severity 14, state 1, line 1:
Login failed for user 'nagios'.
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
This Wizard/Plugin requires SQL authentication and will not work with Windows Auth. What kind of user is "nagios"? Does it have sufficient MSSQL privileges? Do you have any special characters in the password?
Be sure to check out our Knowledgebase for helpful articles and solutions!
lmiltchev wrote:This Wizard/Plugin requires SQL authentication and will not work with Windows Auth. What kind of user is "nagios"? Does it have sufficient MSSQL privileges? Do you have any special characters in the password?
Password had @ in it, but earlier I tired without that too. Even then I had the same issue.
COuld you please tell me what privileges that we can grant for the user nagios, so that I can get it done ad give a try. thanks.
The check_mssql_server.py plugin will NOT work with Windows Authentication and requires local SQL authentication.
You will have to setup a local account on the MSSQL server, set the user rights to DBO and give that user connect rights to the master database and the check should work for you.
Be sure to check out our Knowledgebase for helpful articles and solutions!
tgriep wrote:The check_mssql_server.py plugin will NOT work with Windows Authentication and requires local SQL authentication.
You will have to setup a local account on the MSSQL server, set the user rights to DBO and give that user connect rights to the master database and the check should work for you.
/usr/local/nagios/libexec/check_mssql_server.py -H USRCSQLQ05 -U 'userid' -P 'password@123' -p 1433 --averagewait --warning 20 --critical 30
SQL Server message 297, severity 16, state 1, line 1:
The user does not have permission to perform this action.
DB-Lib error message 297, severity 16:
General SQL Server error: Check messages from the SQL Server
But SQL team claims that they gave the highest privileges and whatever command we run using the user ID should work. i am going wrong somewhere with the command?
And they said when tried with the user ID and password that is shared, they are able to get the output for everything. could you please advise. thanks.
Does the user only have permissions for a specified table? There are some commands that read from the internal MS SQL tables that may require special permissions.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.