Page 2 of 2

Re: check_mssql_database.py gives exceptions.TypeError

Posted: Mon Feb 25, 2019 9:57 am
by sgargano
No, it is 2008R2.

Code: Select all

[root@chlugmw1 libexec]# grep Version /usr/local/nagios/libexec/check_mssql_database.py
# Version    : 2.1.1
Same error with version 2.0.1 of the script.

Here is the result of the query:

Code: Select all

entity_name	subentity_name	permission_name
database		CONNECT
database		SELECT
database		EXECUTE 
entity_name	subentity_name	permission_name
server		CONNECT SQL
server		VIEW ANY DATABASE 

Re: check_mssql_database.py gives exceptions.TypeError

Posted: Mon Feb 25, 2019 6:02 pm
by ssax
Does your user, password, table, or instance have any special characters in them? If so, please surround them in single quotes like so and try again:

Code: Select all

./check_mssql_database.py -H SERVERNAME -U 'USER' -P 'PASSWORD' -T TABLE -I INSTANCE --time2connect  --warning 1 --critical 2

Re: check_mssql_database.py gives exceptions.TypeError

Posted: Tue Feb 26, 2019 4:32 am
by sgargano
there are no special characters. In any case I tried to add the quotes but nothing changes.

Re: check_mssql_database.py gives exceptions.TypeError

Posted: Tue Feb 26, 2019 4:10 pm
by npolovenko
@sgargano, Can you run the following commands and see if it fixes the issue?
yum install python-pip
pip install cython
Can you also check logs on the mssql server side to see what kind of errors show up when authentication fails?

Re: check_mssql_database.py gives exceptions.TypeError

Posted: Mon Mar 04, 2019 4:57 am
by sgargano
Hello,

it looks to be fixed now.

So to summarize:
-both warning and critical values should be declared (cannot miss one of this)
-the values must be between quotes if contains special characters
-installed cython

Thanks for your support

Re: check_mssql_database.py gives exceptions.TypeError

Posted: Mon Mar 04, 2019 8:27 am
by scottwilkerson
sgargano wrote:Hello,

it looks to be fixed now.

So to summarize:
-both warning and critical values should be declared (cannot miss one of this)
-the values must be between quotes if contains special characters
-installed cython

Thanks for your support
Great!



Locking thread