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

In Opensearch miscellaneous behaviour in Alerts #1014

Open
alwalaupendra opened this issue Jul 23, 2024 · 1 comment
Open

In Opensearch miscellaneous behaviour in Alerts #1014

alwalaupendra opened this issue Jul 23, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@alwalaupendra
Copy link

Raising this issue after discussion with AWS support person. In Opensearch alert monitor trigger condition does not work as expected. After speaking to aws support we got to know that issue seems to be specific to mustache.js and the javascript ecosystem in general. In alert trigger condition decimal number query conversion is not happening. Kindly help us to get resolved this.

@alwalaupendra alwalaupendra added bug Something isn't working untriaged labels Jul 23, 2024
@amsiglan
Copy link
Collaborator

amsiglan commented Aug 5, 2024

Can you please provide an example of the trigger condition?

If you are using variables/fields that are integers then it is expected that the result will get round off

for example if the condition is

params.sum / params.total *100 > 70 and params = { sum: 3, total: 4 } then the result be false since 3/4 will evaluate to 0

For this to work correctly we need to cast the field to double
(double)params.sum / params.total * 100 > 70 and that will evaluate to true

@amsiglan amsiglan removed the untriaged label Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants