10 Oct 2024 11:55 PM - last edited on 15 Oct 2024 02:25 PM by MaciejNeumann
Greetings!
I am new to Dynatrace and have been reading a lot of documentation. Hope someone can help me with this use case and clarify a few questions as well.
I have a metric that counts the number of failed jobs in the system, and I want to raise an alert if that metric goes above a specific threshold at a given timeframe. For example, if there are 5 failures in 3 days, raise an alert. If tomorrow, there are only 4 failures within the 3 day window, close the alert. Is this possible in Dynatrace?
Questions:
Thank you
Solved! Go to Solution.
11 Oct 2024 04:05 PM
Hi,
I think that use case is not possible, you can see sliding window for metric events.
But let wait another answers.
Best regards
13 Oct 2024 04:34 PM
Hi @qwerty
The only way I can think of full fill your request is to create a python extension which will collect the metric (metric get api) of failed jobs over your period of time and open an event (event post api) when ever you decide it need to be open
HTH
Yos
14 Oct 2024 12:46 AM
Hey qwerty,
Currently I don't believe there is a way to increase the analysis timeframe beyond 1h for a metric event. To achieve what you're looking for you could do as Yosi suggested or if you're on Dynatrace SaaS you could use a workflow.
To answer the questions more directly:
1. You would find those settings under the "advanced model properties" section as seen below. The same limitations would also currently apply to the new DQL based anomaly detectors in Dynatrace SaaS.
2. The above analysis window settings are set on a per metric event basis. So one could be set to evaluate a 1h period and another only a 5m period.
3. Not really? You could use an auto adaptive threshold but this would increase automatically and not have predefined thresholds. More info can be found here https://docs.dynatrace.com/docs/platform/davis-ai/anomaly-detection/auto-adaptive-threshold. To achieve a set increase in the threshold after each alert you would likely need to use a workflow or some external script that interacts with the API to change the threshold.