MSSQL plugin error

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
amprantino
Posts: 140
Joined: Thu Apr 18, 2013 8:25 am
Location: libexec

MSSQL plugin error

Post by amprantino »

Hello all,

I have downloaded check_mssql_database.py from Nagios exchange
I can successfully run a few checks using the plugin
./check_mssql_database.py -H 192.168.1.1 -p 1234 -U user -P password --time2connect
OK: Time to connect was 0.00571298599243s|time=0.00571298599243s;;;;
but most fail, all with the same error:
./check_mssql_database.py -H 192.168.1.1 -p 1234 -U user -P password --pagelooks
Traceback (most recent call last):
File "./check_mssql_database.py", line 469, in <module>
main()
File "./check_mssql_database.py", line 435, in main
execute_query(mssql, options, host)
File "./check_mssql_database.py", line 448, in execute_query
mssql_query.do(mssql)
File "./check_mssql_database.py", line 284, in do
self.run_on_connection(connection)
File "./check_mssql_database.py", line 271, in run_on_connection
self.query_result = cur.fetchone()[0]
TypeError: 'NoneType' object has no attribute '__getitem__'
freetds is 0.91-6, (0.91 is the minimum needed I think)
apt-cache show freetds-common
Package: freetds-common
Source: freetds
Version: 0.91-6

This plugin has any compatibility issues with specific versions of MSSQL?


Thank you
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: MSSQL plugin error

Post by rkennedy »

What version of MSSQL are you running? The reason I ask is because a previous post suggests Free Pages counter was removed in 2012. ( https://support.nagios.com/forum/viewto ... 18#p166699 )
Former Nagios Employee
amprantino
Posts: 140
Joined: Thu Apr 18, 2013 8:25 am
Location: libexec

Re: MSSQL plugin error

Post by amprantino »

I have tried to MSSQL 2014
Tomorrow, I will try this one to version 2008 & 2012

If this is the case, is there an alternative for MSSQL 2014?
Should check_mssql_health be ok?

Thank you
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: MSSQL plugin error

Post by rkennedy »

Only one metric was removed, what exactly are you trying to monitor with this plugin?

I suspect the failing command will work on 2008, but not 2012.
Former Nagios Employee
amprantino
Posts: 140
Joined: Thu Apr 18, 2013 8:25 am
Location: libexec

Re: MSSQL plugin error

Post by amprantino »

Unfortunately only time2connect is working; so the problem is somewhere else.
I want to monitor MSSQL health in general
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: MSSQL plugin error

Post by rkennedy »

amprantino wrote:Unfortunately only time2connect is working; so the problem is somewhere else.
I want to monitor MSSQL health in general
Can you clarify - time2connect is working on which server OS?
Former Nagios Employee
amprantino
Posts: 140
Joined: Thu Apr 18, 2013 8:25 am
Location: libexec

Re: MSSQL plugin error

Post by amprantino »

time2connect is working on MSSQL 2012
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: MSSQL plugin error

Post by rkennedy »

rkennedy wrote:Only one metric was removed, what exactly are you trying to monitor with this plugin?

I suspect the failing command will work on 2008, but not 2012.
Does pagelocks work on 2012? Can you post the output?
Former Nagios Employee
Locked