Page 1 of 1
MSSQL Free/Stolen Pages - No output
Posted: Mon Jan 04, 2016 2:01 pm
by dlukinski
After using standard Wizard for configuring MSSQL INSTANCE Free Pages or Stolen Pages
we get this error (configured for multiple SQL databases, same error):
(No output on stdout) stderr: Traceback (most recent call last):
File "/usr/local/nagios/libexec/check_mssql_server.py", line 469, in <module>
main()
File "/usr/local/nagios/libexec/check_mssql_server.py", line 435, in main
execute_query(mssql, options, host)
File "/usr/local/nagios/libexec/check_mssql_server.py", line 448, in execute_query
mssql_query.do(mssql)
File "/usr/local/nagios/libexec/check_mssql_server.py", line 284, in do
self.run_on_connection(connection)
File "/usr/local/nagios/libexec/check_mssql_server.py", line 271, in run_on_connection
self.query_result = cur.fetchone()[0]
TypeError: 'NoneType' object is unsubscriptable
Re: MSSQL Free/Stolen Pages - No output
Posted: Mon Jan 04, 2016 2:38 pm
by rkennedy
Can you post the service definition for us to take a look at?
Additionally, what is the result when you run the check command over the CLI?
Re: MSSQL Free/Stolen Pages - No output
Posted: Mon Jan 04, 2016 4:13 pm
by dlukinski
rkennedy wrote:Can you post the service definition for us to take a look at?
Additionally, what is the result when you run the check command over the CLI?
define service {
host_name server.domain.global
service_description Instance - MSSQL Free Pages
use xiwizard_mssqlserver_service
check_command check_xi_mssql_server!-U 'nxxxxxx' -P 'zzzzzzzz1' -I 'replicade
v' --freepages --warning 10 --critical 20!!!!!!!
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
first_notification_delay 10
notification_period xi_timeperiod_24x7
contact_groups CONTACT
_xiwizard mssqlserver
register 1
}
Re: MSSQL Free/Stolen Pages - No output
Posted: Mon Jan 04, 2016 5:07 pm
by hsmith
dlukinski wrote:Additionally, what is the result when you run the check command over the CLI?
Can you please run a check on the CLI and let us know?
Also, what is the output of this command?
Code: Select all
grep Version /usr/local/nagios/libexec/check_mssql_server.py
Re: MSSQL Free/Stolen Pages - No output
Posted: Tue Jan 05, 2016 10:52 am
by dlukinski
hsmith wrote:dlukinski wrote:Additionally, what is the result when you run the check command over the CLI?
Can you please run a check on the CLI and let us know?
Also, what is the output of this command?
Code: Select all
grep Version /usr/local/nagios/libexec/check_mssql_server.py
Version 2.0.2 (XI virtual machine 5.2.3)
[root@fikc-nagxiprod01 ~]# /usr/local/nagios/libexec/check_mssql_server.py -H 10.x.x.30 -U 'xxxxxxxx' -P 'zzzzzzzz' -p 1433 --freepages --warning 10 --critical 20
Traceback (most recent call last):
File "/usr/local/nagios/libexec/check_mssql_server.py", line 469, in <module>
main()
File "/usr/local/nagios/libexec/check_mssql_server.py", line 435, in main
execute_query(mssql, options, host)
File "/usr/local/nagios/libexec/check_mssql_server.py", line 448, in execute_query
mssql_query.do(mssql)
File "/usr/local/nagios/libexec/check_mssql_server.py", line 284, in do
self.run_on_connection(connection)
File "/usr/local/nagios/libexec/check_mssql_server.py", line 271, in run_on_connection
self.query_result = cur.fetchone()[0]
TypeError: 'NoneType' object is unsubscriptable
Re: MSSQL Free/Stolen Pages - No output
Posted: Tue Jan 05, 2016 1:54 pm
by scottwilkerson
Are these MSSQL 2012? I believe Free Pages counter was removed in 2012
http://blogs.msdn.com/b/vsanil/archive/ ... -2012.aspx
Re: MSSQL Free/Stolen Pages - No output
Posted: Tue Jan 05, 2016 4:43 pm
by dlukinski
You right, I overlooked this completely. SQL2012-only issue indeed.
Thank you, this is now resolved