27 Oct 2022 07:43 AM
Is there a way to create alerts for SQL statement that run longer than 1 min for example, in a specific application?
Solved! Go to Solution.
27 Oct 2022 09:30 AM
Hi @KVZ,
It is possible to customize the alerting of a particular database. On the database section you need to go to a database that you are interested in and go to it's settings (click on three dots). Then you will be able to adjust the alerting. You can define a threshold of the response time alerting. It's a bit limited, but you can define that if N % of queries take more than a minute then Dynatrace will report about this situation.
Best Regards,
Mateusz
27 Oct 2022 11:14 AM - edited 27 Oct 2022 12:13 PM
Hi @KVZ,
I would do the following.
Create a multidimension analysis view about the slow database statements (>1s) and a mteric about it:
In one of my environment there are many statements above 1 sec...
At least one metric point should be generated in order to be able to browse it in the metrics or data explorer (after than you can create dashboard or a custom alert): dimension would be your database statements. In the example I focus only to the top ten (Limit =10). Slow database statement metric is the new metric which one created from the MDA.
At anomaly detection you can use the build or code mode version of the new metric. eg in this case code mode filtered for a specific DB service (from the Database menu).
At anomaly detection rule:
Here is the preview for a static threshold (1 occurance within a predefined time frame) and an expected red line for the problem (and finally an alert):
If you had an alert you would only check the data explorer (or the created dashboard about it) or the saved multidimension view.
I hope it helps. Have a nice day.
Best regards,
Mizső
24 Aug 2023 03:25 PM
Dear Team,
We are working on a similar scenario and wanted to send notification which crosses 1 min threshold value. However we cannot navigate to anomaly detection rule. Can you please help us in identifying the section where we can find this option.
Regards,
Debraj
24 Aug 2023 03:55 PM
Hi @DebrajG,
You can create a metric event here:
It will open a problem then you can create an alerting profile and problem notification integration in the settings.
I hope it helps.
Best regards,
Mizső