Bug in "MSSQL Database" wizard

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
gzaloprgm
Posts: 33
Joined: Mon Aug 06, 2018 8:46 am
Contact:

Bug in "MSSQL Database" wizard

Post 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
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Bug in "MSSQL Database" wizard

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Bug in "MSSQL Database" wizard

Post 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;;
Locked