Enhance the ES plugin to check the results count field.
The plugin script uses [hits][hits] for checking the total result count. So, it was updated to use the right field. Change-Id: I371302bc24e59320a59bd815922d41e387e23e3a
This commit is contained in:
parent
b2b0ba86f4
commit
ded4c59dc2
|
@ -132,7 +132,7 @@ def evaluate_results(response, args):
|
|||
pprint(response.json())
|
||||
|
||||
results = response.json()
|
||||
hits = len(results['hits']['hits'])
|
||||
hits = int(results['hits']['total']['value'])
|
||||
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).')
|
||||
|
|
Loading…
Reference in New Issue