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

How to setup custom alerts for services using the REST API?

sanat_dixit
Newcomer

I want to setup multiple custom alerts for all services. Is there a way to do this through the REST API?

In my use case I want to track all errors in a service, and have an alert sent when an error occurs.

There is no way to do that as far as I saw. There are error types 'Server side', 'Client side', 'HTTP 4xx', and 'HTTP 5xx'. If I want to make use of those, its tedious to set this up for all services one by one.

I tried to use the REST API for 'thresholds' with 'timeseriesId' as 'com.dynatrace.builtin:service.errorcounthttp5xx' to setup an alert but got an error back

"Invoke-RestMethod : {"error":{"code":400,"message":"The given timeseries id is not usable for registering a threshold configuration."}}"


8 REPLIES 8

wolfgang_beer
Dynatrace Leader
Dynatrace Leader

Hi,

There is an upcoming feature called 'Configuration API' that is in early access stage right now. It allows you to set up metric events (including custom alerts) by using a new consistent config API. See my screenshot below.

If you would like to test it I can enable the config api EAP on your environment. Just write me an email with your environment information and I will enable it for you.

best,

Wolfgang


bchintapalli
Participant

Hi WolfGang,

We are having Dynatrace managed version. How to create custom alerts for specific application using anomaly detection from REST API?

Please let us know as the I cannot see the above screenshot in DT managed REST API


wolfgang_beer
Dynatrace Leader
Dynatrace Leader

Functionality is identical in Dynatrace Managed, you have to open the API explorer in any of your Dynatrace Managed monitoring environments. You can access your API explorer through the account menu within the Dynatrace environment.


bchintapalli
Participant

Hi Wolfgang,

Where do I see the anomalydetection API as I am not able to see in my env?

is it based on version?dt-managed-api.png PF the attached screenshot for reference.


@Wolfgang B.

When will this part of the API be published?

Is there a way to activate a EAP for our cluster?

regards,

Gerald


wolfgang_beer
Dynatrace Leader
Dynatrace Leader

Its in dev right now. I plan that to be available end of summer.



Hi Wolfgang,

If we have to setup custom alerting at the technology level for metrics like CPU/GC/threads at the process level, dont see that feature in the config api? do you know if there is any other way of doing this or any plan to implement this


Vinnu

You find the necessary api end point under /config/metricEvents

Featured Posts