Skip to content

Add alerts #21

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

Merged
merged 9 commits into from
Aug 16, 2024
Merged

Add alerts #21

merged 9 commits into from
Aug 16, 2024

Conversation

mshahzeb
Copy link

Add new alerts for postgres

expr: |||
avg without(pod, instance)
(rate(pg_stat_database_xact_rollback{db_name!~"template.*|^$"}[5m]) /
(rate(pg_stat_database_xact_commit{db_name!~"template.*|^$"}[5m])+ rate(pg_stat_database_xact_rollback{db_name!~"template.*|^$"}[5m]))) > 0.10
Copy link
Member

Choose a reason for hiding this comment

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

Another nit here, the description has a generic "too many rollbacks", while the query is hardcoded with > 0.10

We should probably communicate to users exactly what percentage is being exceeded, and/or allow them to configure this like our other newer integrations via the config file

@mshahzeb
Copy link
Author

mshahzeb commented Aug 1, 2024

Thanks for the review @Dasomeone

I need to give this PR another pass as I forgot alot of asserts variables are in there. Let me work on it and I will ping you again for review.

@mshahzeb
Copy link
Author

mshahzeb commented Aug 15, 2024

All asserts related items are removed from the alerts.

For thresholds should we make all thresholds configurable? @Dasomeone Do you suggest making them all configurable?

@mshahzeb mshahzeb requested a review from Dasomeone August 15, 2024 08:46
@Dasomeone
Copy link
Member

Dasomeone commented Aug 15, 2024

All asserts related items are removed from the alerts.

For thresholds should we make all thresholds configurable? @Dasomeone Do you suggest making them all configurable?

No for the thresholds I'm looking for context, e.g. why they're set the way they are. A lot of them are hard to intuit, being byte values without explanation, though some of them would benefit from being configurable in the config file.

Could be all if you wanted to, but mostly looking for context

Copy link
Member

@Dasomeone Dasomeone left a comment

Choose a reason for hiding this comment

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

Thanks for removing the asserts references and updating the dbname matcher in the queries, however we're still missing the consistency pass on descriptions, context for given thresholds, and a number of minor things

@mshahzeb mshahzeb requested a review from Dasomeone August 15, 2024 23:04
@mshahzeb mshahzeb merged commit 077a5d1 into master Aug 16, 2024
2 checks passed
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.

2 participants