Monitoring SQL Deadlocks without success
Posted: Mon Mar 03, 2014 10:10 am
Hi,
I,m trying to monitoring de deadlocks of a SQL Server with my Nagios instalation, to do this, i'm install de "check_mssql_server.py"
When i execute this command
./check_mssql_server.py -H myIP -U myuser -P mypass
the command works fine
OK: Time to connect was 8.00312805176s|time=8.00312805176s;;;;;
But when im execute
./check_mssql_server.py -H myIP -U myuser -P mypass --deadlocks --warning 20 --critical 30
the result is
Traceback (most recent call last):
File "./check_mssql_server.py", line 464, in <module>
main()
File "./check_mssql_server.py", line 430, in main
execute_query(mssql, options, host)
File "./check_mssql_server.py", line 443, in execute_query
mssql_query.do(mssql)
File "./check_mssql_server.py", line 282, in do
self.run_on_connection(connection)
File "./check_mssql_server.py", line 269, in run_on_connection
self.query_result = cur.fetchone()[0]
TypeError: 'NoneType' object has no attribute '__getitem__'
root@Nagios:/usr/local/nagios/libexec#
Please, im try to solve this for many hours without success, any help is welcome,
thanks in advance
Pedro,
I,m trying to monitoring de deadlocks of a SQL Server with my Nagios instalation, to do this, i'm install de "check_mssql_server.py"
When i execute this command
./check_mssql_server.py -H myIP -U myuser -P mypass
the command works fine
OK: Time to connect was 8.00312805176s|time=8.00312805176s;;;;;
But when im execute
./check_mssql_server.py -H myIP -U myuser -P mypass --deadlocks --warning 20 --critical 30
the result is
Traceback (most recent call last):
File "./check_mssql_server.py", line 464, in <module>
main()
File "./check_mssql_server.py", line 430, in main
execute_query(mssql, options, host)
File "./check_mssql_server.py", line 443, in execute_query
mssql_query.do(mssql)
File "./check_mssql_server.py", line 282, in do
self.run_on_connection(connection)
File "./check_mssql_server.py", line 269, in run_on_connection
self.query_result = cur.fetchone()[0]
TypeError: 'NoneType' object has no attribute '__getitem__'
root@Nagios:/usr/local/nagios/libexec#
Please, im try to solve this for many hours without success, any help is welcome,
thanks in advance
Pedro,