update
This commit is contained in:
parent
4de16544a3
commit
e6f24496a8
@ -116,17 +116,21 @@ def check_logs(logger):
|
||||
if "Error from tendermint rpc" in line:
|
||||
error_count += 1
|
||||
logger.error(f"RPC error: {line}")
|
||||
if "Is your verifier's account funded" in line:
|
||||
logger.error(f"Verifier account not funded: {line}")
|
||||
error_count += 1
|
||||
if "Synced with network" in line:
|
||||
sync_count += 1
|
||||
logger.info(f"Synced with network: {line}")
|
||||
|
||||
|
||||
challenge_match = re.search(r'made (\d+) secret challenges', line)
|
||||
if challenge_match:
|
||||
total_challenges += int(challenge_match.group(1))
|
||||
logger.info(f"Made {total_challenges} secret challenges: {line}")
|
||||
|
||||
result = {
|
||||
"rpc_errors": error_count,
|
||||
"errors": error_count,
|
||||
"sync_events": sync_count,
|
||||
"total_challenges": total_challenges
|
||||
}
|
||||
@ -156,7 +160,7 @@ if __name__ == "__main__":
|
||||
|
||||
try:
|
||||
result = check_logs(logger)
|
||||
data = f"{result['sync_events']}/{result['total_challenges']}/{result['rpc_errors']}" # Syncs/Challenges/RPC errors
|
||||
data = f"{result['sync_events']}/{result['total_challenges']}/{result['errors']}" # Syncs/Challenges/Errors
|
||||
grist_callback({ "Health": data })
|
||||
print(result)
|
||||
except Exception as e:
|
||||
|
Loading…
Reference in New Issue
Block a user