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

Dynamic value alert article #15

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

afoonalex
Copy link
Contributor

No description provided.

SELECT
CASE
WHEN active_users_last_week < active_users_in_previous_3_weeks THEN 1 ELSE 0 END
FROM ...
Copy link
Member

Choose a reason for hiding this comment

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

Need full example here to make it clear...


For example - you have a query that returns number of active users last week and another query that returns the active users in the last 3 weeks.

You'll need to create an additional query to trigger an alert when the # of active users last week is lower than previous 3 weeks. The target is dynamic so in order to make it work with an alert, write the following query that examines and compares the two values using the 'CASE' clause (this works for PostgreSQL):
Copy link
Member

Choose a reason for hiding this comment

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

`CASE`

@@ -0,0 +1,16 @@
# Creating an Alert with a Target Value from Another Query
Copy link
Member

Choose a reason for hiding this comment

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

Maybe "Trigger alert based on a dynamic target value"?

@afoonalex
Copy link
Contributor Author

?

@afoonalex
Copy link
Contributor Author

@arikfr ?

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