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

Extracting Entities with ‘Frequent Problems’ via API

crowngy
Frequent Guest

I would like to know how I can extract via API the entities that have issues marked as 'Frequent Issue'.

1 REPLY 1

mark_bley
Dynatrace Champion
Dynatrace Champion

You filter through the events API, looking for frequentEvent(true) Events:

curl --location 'https://xxxx.managed.dynatrace.com/e/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/api/v2/events?from=-3d&to=now&eventSelector=frequentEvent(true)' \
--header 'Authorization: Api-Token dt0c01.FOO.BAR' \

 

The payload will be a list of events, with the respective entities in it e.g.:

{
    "totalCount": 711,
    "pageSize": 100,
    "nextPageKey": "AQANMTcxODU1NTg5ODQ1NAEA",
    "events": [
        {
            "eventId": "-2xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "startTime": xxxxxxxxxxxxx,
            "endTime": -1,
            "eventType": "SERVICE_ERROR_RATE_INCREASED",
            "title": "Failure rate increase",
            "entityId": {
                "entityId": {
                    "id": "SERVICE-xxxxxxxxxxxxxxxx",
                    "type": "SERVICE"
                },
                "name": "xxxxxxxxxx"
            },
            "properties": [
            ],
            "status": "OPEN",
            "correlationId": "xxxxxxxxxxxxxxxx",
            "entityTags": [
            ],
            "managementZones": [
            ],
            "underMaintenance": false,
            "suppressAlert": false,
            "suppressProblem": false,
            "frequentEvent": true
        },
,,,

 Iterating through the list you will be able to extract all entitles which are having frequent issues.

Featured Posts