Skip to content

Conversation

@ayazabbas
Copy link
Contributor

Adds a Zenduty Event type, which requires us to manually resolve an incident once it surpasses so I have added logic to monitor open alerts and resolve them if the last alert was > 2 minutes ago. Open alerts are written to a file for persistence across app restarts, so we don't end up with orphaned unresolved incidents.

Copy link
Contributor

@ali-behjati ali-behjati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Please address my inline comments before merging.

Can you also add some descriptions about this alert type + the env variables needed for it in the readme?

f"Received 429 Too Many Requests for {alert_identifier}. Retrying in 1 second..."
)
await asyncio.sleep(
min(30, 2 ^ retries)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this does the xor, should be 2**retries

@ayazabbas ayazabbas merged commit 7088a26 into main May 17, 2024
@ayazabbas ayazabbas deleted the AA_zenduty-events branch May 17, 2024 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants