Only notify the team if critical checks have failed.
This commit is contained in:
parent
5eece67b03
commit
3f4742a436
|
@ -98,9 +98,10 @@ async def check_health():
|
||||||
|
|
||||||
if len(failed_records) > 0:
|
if len(failed_records) > 0:
|
||||||
message = "Found {} failed checks ({} critical) over the last {} hours!".format(failed_checks, failed_critical,
|
message = "Found {} failed checks ({} critical) over the last {} hours!".format(failed_checks, failed_critical,
|
||||||
check_hours)
|
CHECK_HOURS)
|
||||||
await send_msg(client, message, file=discord.File(io.BytesIO(json.dumps(failed_records, indent=2).encode()),
|
file = discord.File(io.BytesIO(json.dumps(failed_records, indent=2).encode()), filename="failed_checks.log")
|
||||||
filename="failed_checks.log"), force_notify=True)
|
notifyTeam = failed_critical > 0
|
||||||
|
await send_msg(client, message, file=file, force_notify=notifyTeam)
|
||||||
return
|
return
|
||||||
|
|
||||||
# Send an informational heartbeat if all checks passed.
|
# Send an informational heartbeat if all checks passed.
|
||||||
|
|
Reference in New Issue