cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Metric events based on a custom timeframe

qwerty
Newcomer

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:

  1. Is there a way to add a date/time filter on an event metric? I took a look at timeshift, rollup and rate functions but they don't seem to be relevant to what I need.
  2. Is the time window for anomaly detection is set for everything at once? Is there a way to set it for a specific metric event?
  3. Is there a way to increase the threshold after every alert? like 5 then 10 then 15?

 

Thank you

3 REPLIES 3

AntonPineiro
DynaMight Guru
DynaMight Guru

Hi,

I think that use case is not possible, you can see sliding window for metric events.

But let wait another answers.

Best regards

❤️ Emacs ❤️ Vim ❤️ Bash ❤️ Perl

Yosi_Neuman
DynaMight Guru
DynaMight Guru

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 

dynatrace certificated professional - dynatrace master partner - Matrix Soft Ware Division - Israel

Fin_Ubels
Dynatrace Champion
Dynatrace Champion

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. 

Fin_Ubels_0-1728862236454.png

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.

 

Featured Posts