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

External API issue alerting in our service

Imran_Siddiqui
Newcomer

Hi Team,

 

I have a application say COD im which I have some external API call

Is there anyway I can alert/notify in dynatrace in these cases:

 

  • If external api is throwing 500
  • If external api is throwing 401
  • External api is not reachable 
1 REPLY 1

JoseRomero
Dynatrace Advisor
Dynatrace Advisor

To set up alerts or notifications in Dynatrace for specific issues with your external API calls, such as receiving a 500 error, a 401 error, or when the external API is not reachable, you can use the following steps:

  • Create Custom Service for External API:

    • First, ensure that your external API calls are being tracked as a service in Dynatrace. You might need to define a custom service for the API endpoints if they are not automatically detected.
      • click on the right site "Monitor as a separate service"

JoseRomero_0-1717649015168.png

  • Create Custom Metrics:

    • create custom metrics to count the occurrences of specific status codes.
      • click on the right site "Creare metric"

JoseRomero_2-1717650318840.png

  • Define Anomaly Detection Custom Metric Alert:

    • Create anomaly detection on the custom metrics. You can specify the conditions under which the alerts should be triggered, such as a specific number of 500 errors, 401 errors, or when the API is not reachable for a certain period. You can use data explorer to get the count metric and filter by error code filtering by status code starts with 5, 4 or missing. Example

 

 

:filter(and(or(prefix("HTTP status","5"))))
:filter(and(or(prefix("HTTP status","4"))))
:filter(and(or(eq("HTTP status","missing"))))

 

 

 

Featured Posts