Hello,
We are having difficulty configuring the proper permissions to monitor Wait times and Deadlocks for MSSQL (via the check_xi_mssql_server script). The 'MSSQL Connection Time' portion of check_xi_mssql_server script is working properly.
Presently, we have granted the Nagios SQL account to have public and db_datareader permissions the master and tempdb databases. What are we missing?
Any help is greatly appreciated. Thank you.
MSSQL Database permissions
Re: MSSQL Database permissions
Could you post a full version of the check command you are attempting? The proper permissions are mode/check dependent.
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.
-
Mwr_support
- Posts: 2
- Joined: Thu Aug 22, 2013 3:39 pm
Re: MSSQL Database permissions
MSSQL Deadlocks Per Sec
COMMAND: /usr/local/nagios/libexec/check_mssql_server.py -H 192.168.0.142 -U 'user' -P 'password' -p 1433 --deadlocks --warning 20 --critical 30
OUTPUT: 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
MSSQL Lock Wait Times
COMMAND: /usr/local/nagios/libexec/check_mssql_server.py -H 192.168.0.142 -U 'user' -P 'password' -p 1433 --lockwait --warning 2000 --critical 3000
OUTPUT: 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
MSSQL Connection Time (working properly)
COMMAND: /usr/local/nagios/libexec/check_mssql_server.py -H 192.168.0.142 -U 'user' -P 'password' -p 1433 --time2connect --warning 1 --critical 5
OUTPUT: OK: Time to connect was 0.0089008808136s|time=0.0089008808136s;1;5;;;
COMMAND: /usr/local/nagios/libexec/check_mssql_server.py -H 192.168.0.142 -U 'user' -P 'password' -p 1433 --deadlocks --warning 20 --critical 30
OUTPUT: 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
MSSQL Lock Wait Times
COMMAND: /usr/local/nagios/libexec/check_mssql_server.py -H 192.168.0.142 -U 'user' -P 'password' -p 1433 --lockwait --warning 2000 --critical 3000
OUTPUT: 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
MSSQL Connection Time (working properly)
COMMAND: /usr/local/nagios/libexec/check_mssql_server.py -H 192.168.0.142 -U 'user' -P 'password' -p 1433 --time2connect --warning 1 --critical 5
OUTPUT: OK: Time to connect was 0.0089008808136s|time=0.0089008808136s;1;5;;;
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: MSSQL Database permissions
It looks like the user you are connecting to on the remote host does not have permission to run those queries. Are they able to do it on the system if you log in manually? It's not the nagios mysql account, its the one on the remote DB that you are accessing that is having the problems.