Hi everyone,
We have a need to run a specific SQL query once a day, wait a few minutes, and then run the same query again. If the two results are identical, it indicates that something isn’t working as expected, and we need to trigger an alert to a team.
Example workflow:
- Run the query at 8:00 AM
- Wait 5 minutes
- Run it again at 8:05 AM
- If both results are the same, send an alert
- Then do nothing until the next day
I was thinking of doing this with Python and storing the first result in a variable and then using time.sleep() wait, running the query again, and comparing the results.
Would that approach make sense, or is there a better / more Dynatrace-native way to handle this kind of scheduled comparison and alerting?
Thanks in advance for any suggestions!