read hash mismatch errors from influx and error if > 0 (#14240)
This commit is contained in:
committed by
GitHub
parent
71b88da48e
commit
b36ad91792
14
system-test/testnet-automation-json-parser-missing.py
Normal file
14
system-test/testnet-automation-json-parser-missing.py
Normal file
@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
import sys, json
|
||||
|
||||
data=json.load(sys.stdin)
|
||||
|
||||
# this code is designed for influx queries where 'no data' means 0
|
||||
if 'results' in data:
|
||||
for result in data['results']:
|
||||
val = "0"
|
||||
if 'series' in result:
|
||||
val = str(result['series'][0]['values'][0][1])
|
||||
print(val)
|
||||
else:
|
||||
print("No results returned from CURL request")
|
Reference in New Issue
Block a user