This check is working for me against Windows 2008 server.User permissions account on my MSSQL server has Server Role = sysadmin.
Code: Select all
[root@main-nagios-xi ~]# /usr/local/nagios/libexec/check_mssql_database.py -H x.x.x.x -U 'username' -P 'password' -T 'master' -I INSTANCE --logcachehit --warning 0:95 --critical 0:97
OK: Log Cache Hit Ratio is 57.1428571429%|log_cache_hit_ratio=57.1428571429%;0:95;0:97;;Also, it wouldn't hurt to double check the permissions just in case. You can log in the MSSQL server, and run the query to view permissions, e.g.
Code: Select all
SELECT * FROM fn_my_permissions(null, 'DATABASE')No, only critical notifications will be sent. Most of nagios plugins, including this one, are checking for a critical to exit before checking for warning. If you ran the check from the CLI with the same threshold for warning and critical, you would see that the only status that is returned is critical.if warning and critical have the same value will 2 messages/alerts be sent?