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

Allow providing an error rate query rather than a error count query #1170

Open
LukeDAtkinson opened this issue May 2, 2024 · 1 comment
Open

Comments

@LukeDAtkinson
Copy link

We are scraping AWS Cloudwatch metrics from Cloudwatch into Prometheus. We want to define SLOs using these metrics.

AWS Cloudwatch reports an error rate as a proportion of total requests. It is possible to calculate the total number of errors by multiplying this by the total number of requests (i.e.

aws_cloudfront_5xx_error_rate_average * increase(aws_cloudfront_requests_sum_count[5m])

). However, when we try to use such a multiplication expression of two metrics in the error field of the ratio indicator, it causes errors in Pyrra. It seems Pyrra expects to be able to parse a single metric expression from this field.

Would it be possible to either add an errorRate field to the ratio indicator or provide a different type of indicator, and implement the necessary calculation of the total errors in Pyrra to handle this case?

@pharaujo
Copy link

pharaujo commented Jul 9, 2024

Hey @LukeDAtkinson, I'm not involved with the project, but my first thought when I read your issue was that creating a recording rule with that expression and then using the resulting series would possibly address your problem? You'd still have to either backfill the calculation to have an accurate SLO, or just wait for the data to be available.

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

No branches or pull requests

2 participants