Page 1 of 1

Bug in "MSSQL Database" wizard

Posted: Fri Nov 09, 2018 11:45 am
by gzaloprgm
Hi
I've found a bug in the "MSSQL Database" wizard:
The default thresholds for the "Log Cache Hitrate" measurement are wrong. The upper thresholds should be swapped since a lower value is worse.
Image

Using the services created by the wizard, the plugin (check_mssql_database.py) breaks and never goes to critical nor warning. I think this is happening because the range generated by the wizard are not correct. Currently they are being generated like "0:95", while they should be "@0:95".

Thanks, Gonzalo

Re: Bug in "MSSQL Database" wizard

Posted: Fri Nov 09, 2018 4:41 pm
by cdienger
The thresholds it sets would trigger a warning if the hit rate was greater than 95% and trigger a critical if it was greater than 97%. Given a higher hit rate is usually a desirable thing I agree that these should be adjusted. I'll file a bug with our dev team.

Re: Bug in "MSSQL Database" wizard

Posted: Fri Nov 09, 2018 4:46 pm
by ssax
What version of the plugin are you running?

Code: Select all

grep Version /usr/local/nagios/libexec/check_mssql_database.py
Here's an example from mine and it's working (Version 2.1.1):

Code: Select all

[root@xid ~]# /usr/local/nagios/libexec/check_mssql_database.py -H 192.168.X.X -U 'axxxxx' -P 'nxxxxxx' -T 'master' -p 1433 --logcachehit --warning 0:97 --critical 0:99
OK: Log Cache Hit Ratio is 57.1428571429%|log_cache_hit_ratio=57.1428571429%;0:97;0:99;;

[root@xid ~]# /usr/local/nagios/libexec/check_mssql_database.py -H 192.168.X.X -U 'axxxxx' -P 'nxxxxxx' -T 'master' -p 1433 --logcachehit --warning 0:56 --critical 0:59
WARNING: Log Cache Hit Ratio is 57.1428571429%|log_cache_hit_ratio=57.1428571429%;0:56;0:59;;

[root@xid ~]# /usr/local/nagios/libexec/check_mssql_database.py -H 192.168.X.X -U 'axxxxx' -P 'nxxxxxx' -T 'master' -p 1433 --logcachehit --warning 0:54 --critical 0:56
CRITICAL: Log Cache Hit Ratio is 57.1428571429%|log_cache_hit_ratio=57.1428571429%;0:54;0:56;;