-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Unable to setup alerts based on expression #38578
Comments
Alerting works on numbers and not time series type data. So if $A and $B are time series data, that math expression will also provide time series data. So reducing is required like when you select $D. The other option, depending on your data and logic, is to reduce $A and $B with additional operations, and then use math operation on those reduced inputs. Then the math operation will output numbers instead of time series and can be selected as the condition. |
Thanks @kylebrandt. |
the reduce didn't work for me. (sum by (projectId) (rate(events_total{projectId='XXX'}[5m]))) - (sum by (projectId) (rate(events_total{projectId='XXX'}[24h]))) |
@kylebrandt I'm not sure I follow your comment there. If I create a query from my Cloudwatch database like this:
I get a time series plot. I can configure an alert on this expression.
I still get a time series plot, and I can still configure an alert. However, if I add a second query:
and a math expression:
And try to alert on the expression then I get an error:
Expression C still visualises as a time series. Could you explain how what you were saying about time series/numbers in relation to alerting applies here? Could you, or anyone else, give some guidance on how to accomplish alerting on one time series as a percentage of another? |
@kylebrandt I am trying to setup alerts based on exact same use case as OP (#31471), however I can't still setup alerts on Math expression and it shows error as can be seen in screenshot:
Now if i try to setup alert on reduced expression D, it seems to be not throwing any error, however I am not certain if this is correct way to configure for this use case. Any help would be highly appreciated. Thanks!
Originally posted by @iamyogeshg in #31471 (comment)
The text was updated successfully, but these errors were encountered: