Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add alert when there are too many queued jobs on crates.io #330

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ansible/playbooks/monitoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@
labels:
dispatch: pagerduty-cratesio

- alert: TooManyQueuedJobs
expr: cratesio_service_background_jobs{env="prod"} > 100
Copy link
Member

Choose a reason for hiding this comment

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

we introduced a priority column for background jobs lately and when we backfilled the rust-version values a few weeks ago we had several thousand low-priority background jobs queued up. I guess such a case would trigger the pagerduty alert if we merged it like this. Maybe we should somehow feed the priority into the monitoring system too? For the bin/monitor application we only consider priority >= 0 (normal or higher).

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think the priority is exposed through the cratesio_service_background_jobs metric though. We should add it first.

Copy link
Member Author

Choose a reason for hiding this comment

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

Will update once rust-lang/crates.io#6871 is deployed.

Copy link
Member

Choose a reason for hiding this comment

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

the PR is deployed in staging and production now

for: 1m
labels:
dispatch: pagerduty-cratesio

- name: docsrs
rules:
- alert: DocsRsDown
Expand Down