Re: How to check SQL jobs (particular jobs)
Posted: Tue Oct 29, 2019 2:19 pm
CRITICAL: Query result cdc.Siebeldb_QA_capture was higher than Query critical threshold 2mbellerue wrote:What is the actual result of the query?
Support for Nagios products and services
https://support.nagios.com/forum/
CRITICAL: Query result cdc.Siebeldb_QA_capture was higher than Query critical threshold 2mbellerue wrote:What is the actual result of the query?
When your result exceeds the querywarning or querycritical threshold, then you would get a non-OK state. This is by design.Hi, query works now, but provides a strange result:
CRITICAL: Query result cdc.Siebeldb_QA_capture was higher than Query critical threshold 2.
- we need this to be critical if the job is not running (--querywarning 1 --querycritical 2 --result "Expected result")
Code: Select all
/usr/local/nagios/libexec/check_mssql -h-w, --warning Warning threshold in seconds on duration of check
-c, --critical Critical threshold in seconds on duration of check
-W, --querywarning Query warning threshold
-C, --querycritical Query critical threshold
Code: Select all
/usr/local/nagios/libexec/check_mssql -H x.x.x.x --username test --password test --database master --instance test --query "SELECT+COUNT%28%2A%29+FROM+sys.sysperfinfo" --result "1008" --decode --warning 1 --critical 2 --querywarning 1500 --querycritical 2000
OK: Query duration=0.001114 seconds. Query result=1008|query_duration=0.001114s;1;2 'computed0'=1008;1500;2000
/usr/local/nagios/libexec/check_mssql -H x.x.x.x --username test --password "test" --database master --instance test --query "SELECT+COUNT%28%2A%29+FROM+sys.sysperfinfo" --result "1008" --decode --warning 1 --critical 2 --querywarning 500 --querycritical 1000
CRITICAL: Query result 1008 was higher than Query critical threshold 1000.|query_duration=0.000929s;1;2 'computed0'=1008;500;1000Code: Select all
--result "cdc.Siebeldb_QA_capture"