Fix logic for critical_threshold to match the documentation

Change-Id: I1ac031106d487d61688207c714911fd91d1a717f
This commit is contained in:
Smith, David (ds3330) 2021-02-04 19:54:05 +00:00 committed by Andrii Ostapenko
parent 6f41c6ee84
commit a262c243d2
1 changed files with 1 additions and 1 deletions

View File

@ -134,7 +134,7 @@ def evaluate_results(response, args):
crit_message = ('Found %s >= %s(threshold) occurrences within the last %s minute(s). %s')
message = ('Found %s >= %s(threshold) occurrences within the last %s minute(s).')
ok_message = ('Found %s [threshold: %s] occurrences within the last %s minute(s).')
if hits > args.critical_threshold:
if hits >= args.critical_threshold:
if args.simple_query_fields:
allmsgs = ', '.join([m["_source"][args.simple_query_fields] for m in results['hits']['hits']])
NagiosUtil.service_critical(crit_message % (str(hits), args.critical_threshold, args.range, allmsgs))