Hello XI support
We've got Out of the box SQL checks configured, but thresholds we've set do not seem to work.
Example 1
CONFIGURED: -U 'qqqq' -P 'qqqq' -I 'FIKCALFCLDB01S1' --averagewait --warning 9000 --critical 10000
OUTPUT: CRITICAL: Average Wait Time (ms) is 8885.50470195ms
Example 2
CONFIGURED: -U 'qqqq -P 'qqqq' -I 'FIKCALFCLDB01S1' --batchreq --warning 3000 --critical 5000
OUTPUT: CRITICAL: Batch Requests / Sec is 1402.27076641/sec
Example 3
CONFIGURED: -U 'qqqq' -P 'qqqqq' -I 'FIKCALFCLDB01S1' --databasepages --warning 20000000 --critical 25000000
OUTPUT: CRITICAL: Database pages are 24924714.0
SQL check thesholds are not working correclty
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: SQL check thesholds are not working correclty
Which SQL plugins are you using for these?
Re: SQL check thesholds are not working correclty
Nagios XI out of the box (for SQL server/instance)scottwilkerson wrote:Which SQL plugins are you using for these?
Re: SQL check thesholds are not working correclty
Looks like you may have a bad 'box'. I've tested on a 5.6.14 version and it seems to work as expected. What 'box' did you get? Is this an OVA, rpm, or source intall? What version of XI and what version of the plugin? You're using check_mssql_server.py, correct?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: SQL check thesholds are not working correclty
Nagios OVA. Version 5.6.14; Wizard version 1.9.2 , check_mssql_server.pycdienger wrote:Looks like you may have a bad 'box'. I've tested on a 5.6.14 version and it seems to work as expected. What 'box' did you get? Is this an OVA, rpm, or source intall? What version of XI and what version of the plugin? You're using check_mssql_server.py, correct?
Re: SQL check thesholds are not working correclty
This is a bug.
Please change this code (around line 428):
To this:
Then try again.
Please change this code (around line 428):
Code: Select all
actions = [ (r'^%s$' % first_float,lambda y: (value > float(y.group('first'))) or (value < 0)),
(r'^%s:$' % first_float,lambda y: value < float(y.group('first'))),
(r'^~:%s$' % first_float,lambda y: value > float(y.group('first'))),
(r'^%s:%s$' % (first_float,second_float), lambda y: (value < float(y.group('first'))) or (value > float(y.group('second')))),
(r'^@%s:%s$' % (first_float,second_float), lambda y: not((value < float(y.group('first'))) or (value > float(y.group('second')))))]Code: Select all
actions = [ (r'^%s$' % first_float,lambda y: (float(value) > float(y.group('first'))) or (value < 0)),
(r'^%s:$' % first_float,lambda y: float(value) < float(y.group('first'))),
(r'^~:%s$' % first_float,lambda y: float(value) > float(y.group('first'))),
(r'^%s:%s$' % (first_float,second_float), lambda y: (float(value) < float(y.group('first'))) or (float(value) > float(y.group('second')))),
(r'^@%s:%s$' % (first_float,second_float), lambda y: not((float(value) < float(y.group('first'))) or (float(value) > float(y.group('second')))))]Re: SQL check thesholds are not working correclty
Did not work (could you attach/email full plugin file?):ssax wrote:This is a bug.
Please change this code (around line 428):
To this:Code: Select all
actions = [ (r'^%s$' % first_float,lambda y: (value > float(y.group('first'))) or (value < 0)), (r'^%s:$' % first_float,lambda y: value < float(y.group('first'))), (r'^~:%s$' % first_float,lambda y: value > float(y.group('first'))), (r'^%s:%s$' % (first_float,second_float), lambda y: (value < float(y.group('first'))) or (value > float(y.group('second')))), (r'^@%s:%s$' % (first_float,second_float), lambda y: not((value < float(y.group('first'))) or (value > float(y.group('second')))))]
Then try again.Code: Select all
actions = [ (r'^%s$' % first_float,lambda y: (float(value) > float(y.group('first'))) or (value < 0)), (r'^%s:$' % first_float,lambda y: float(value) < float(y.group('first'))), (r'^~:%s$' % first_float,lambda y: float(value) > float(y.group('first'))), (r'^%s:%s$' % (first_float,second_float), lambda y: (float(value) < float(y.group('first'))) or (float(value) > float(y.group('second')))), (r'^@%s:%s$' % (first_float,second_float), lambda y: not((float(value) < float(y.group('first'))) or (float(value) > float(y.group('second')))))]
(No output on stdout) stderr: File "/usr/local/nagios/libexec/check_mssql_server.py", line 432
for regstr,func in actions:
^
IndentationError: unexpected indent
Re: SQL check thesholds are not working correclty
I'm not sure if that's the fix but just try this one and see if it works (see attached).
You do not have the required permissions to view the files attached to this post.