MSSQL Free/Stolen Pages - No output

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

MSSQL Free/Stolen Pages - No output

Post 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
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: MSSQL Free/Stolen Pages - No output

Post 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?
Former Nagios Employee
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: MSSQL Free/Stolen Pages - No output

Post 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
}
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: MSSQL Free/Stolen Pages - No output

Post 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
Former Nagios Employee.
me.
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: MSSQL Free/Stolen Pages - No output

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: MSSQL Free/Stolen Pages - No output

Post by scottwilkerson »

Are these MSSQL 2012? I believe Free Pages counter was removed in 2012

http://blogs.msdn.com/b/vsanil/archive/ ... -2012.aspx
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
dlukinski
Posts: 1130
Joined: Tue Oct 06, 2015 9:42 am

Re: MSSQL Free/Stolen Pages - No output

Post by dlukinski »

scottwilkerson wrote:Are these MSSQL 2012? I believe Free Pages counter was removed in 2012

http://blogs.msdn.com/b/vsanil/archive/ ... -2012.aspx
You right, I overlooked this completely. SQL2012-only issue indeed.

Thank you, this is now resolved
Locked