Page 1 of 1

MSSQL plugin error

Posted: Tue Feb 09, 2016 9:20 am
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

Re: MSSQL plugin error

Posted: Tue Feb 09, 2016 11:08 am
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 )

Re: MSSQL plugin error

Posted: Tue Feb 09, 2016 1:34 pm
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

Re: MSSQL plugin error

Posted: Tue Feb 09, 2016 2:34 pm
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.

Re: MSSQL plugin error

Posted: Tue Feb 09, 2016 2:49 pm
by amprantino
Unfortunately only time2connect is working; so the problem is somewhere else.
I want to monitor MSSQL health in general

Re: MSSQL plugin error

Posted: Wed Feb 10, 2016 10:04 am
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?

Re: MSSQL plugin error

Posted: Wed Feb 10, 2016 10:19 am
by amprantino
time2connect is working on MSSQL 2012

Re: MSSQL plugin error

Posted: Wed Feb 10, 2016 11:10 am
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?