List Events
Lists events within the specified timeframe.
Basic Parameters
Parameter | Description |
---|---|
From | The start of the requested timeframe. You can use one of the following formats: Timestamp in UTC milliseconds. Human-readable format of 2021-01-25T05:57:01.123+01:00 . If no time zone is specified, UTC is used. You can use a space character instead of the T . Seconds and fractions of a second are optional. Relative timeframe, back from now. The format is now-NU/A , where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU . Supported time units for the relative timeframe are: m : minutes h : hours d : days w : weeks M : months * y : years If not set, the relative timeframe of two hours is used ( now-2h ). |
To | The end of the requested timeframe. You can use one of the following formats: Timestamp in UTC milliseconds. Human-readable format of 2021-01-25T05:57:01.123+01:00 . If no time zone is specified, UTC is used. You can use a space character instead of the T . Seconds and fractions of a second are optional. Relative timeframe, back from now. The format is now-NU/A , where N is the amount of time, U is the unit of time, and A is an alignment. The alignment rounds all the smaller values to the nearest zero in the past. For example, now-1y/w is one year back, aligned by a week. You can also specify relative timeframe without an alignment: now-NU . Supported time units for the relative timeframe are: m : minutes h : hours d : days w : weeks M : months * y : years If not set, the current timestamp is used. |
Advanced Parameters
Parameter | Description |
---|---|
Entity Selector | The entity scope of the query. You must set one of these criteria: Entity type: type("TYPE") Dynatrace entity ID: entityId("id") . You can specify several IDs, separated by a comma (entityId("id-1","id-2") ). All requested entities must be of the same type. You can add one or more of the following criteria. Values are case-sensitive and the EQUALS operator is used unless otherwise specified. Tag: tag("value") . Tags in [context]key:value , key:value , and value formats are detected and parsed automatically. Any colons (: ) that are part of the key or value must be escaped with a backslash(\ ). Otherwise, it will be interpreted as the separator between the key and the value. All tag values are case-sensitive. Management zone ID: mzId(123) Management zone name: mzName("value") Entity name: entityName.equals : performs a non-casesensitive EQUALS query. entityName.startsWith : changes the operator to BEGINS WITH . entityName.in : enables you to provide multiple values. The EQUALS operator applies. caseSensitive(entityName.equals("value")) : takes any entity name criterion as an argument and makes the value case-sensitive.Health state (HEALTHY,UNHEALTHY): healthState("HEALTHY") First seen timestamp: firstSeenTms.<operator>(now-3h) . Use any timestamp format from the from/to parameters. The following operators are available: lte : earlier than or at the specified timelt : earlier than the specified timegte : later than or at the specified timegt : later than the specified timeEntity attribute: ("value1","value2") and .exists() . To fetch the list of available attributes, execute the GET entity type request and check the properties field of the response. Relationships: fromRelationships.<relationshipName>() and toRelationships.<relationshipName>() . This criterion takes an entity selector as an attribute. To fetch the list of available relationships, execute the GET entity type request and check the fromRelationships and toRelationships fields.* Negation: not(<criterion>) . Inverts any criterion except for type. For more information, see Entity selector in Dynatrace Documentation. To set several criteria, separate them with a comma ( , ). For example, type("HOST"),healthState("HEALTHY") . Only results matching all criteria are included in the response. The maximum string length is 2,000 characters. The number of entities that can be selected is limited to 10000. |
Event Selector | Defines the scope of the query. Only events matching the specified criteria are included in the response. You can add one or several of the criteria listed below. For each criterion you can specify multiple comma-separated values, unless stated otherwise. If several values are specified, the OR logic applies. Event ID: eventId("id-1", "id-2") .ID of related entity: entityId("id-1", "id-2") .Event status: status("OPEN") or status("CLOSED") . You can specify only one status.Management zone ID: managementZoneId("123", "321") .Event type: eventType("event-type") . You can specify only one event type. You can fetch the list of possible event types with the GET event types call. Correlation ID: correlationId("id-1", "id-2") .Happened during maintenance (true, false): underMaintenance(true) . Notifications are suppressed (true, false): suppressAlert(true) . Problem creation is suppressed (true, false): suppressProblem(true) . Frequent event (true, false): frequentEvent(true) . * Event property: property.<key>("value-1", "value-2") .To set several criteria, separate them with commas ( , ). Only results matching all criteria are included in the response. |
Next Page Key | The cursor for the next page of results. You can find it in the nextPageKey field of the previous response. The first page is always returned if you don't specify the nextPageKey query parameter. When the nextPageKey is set to obtain subsequent pages, you must omit all other query parameters. |
Page Size | The amount of events in a single response payload. The maximal allowed page size is 1000. If not set, 100 is used. |
Example Output
{
"events": [
{
"correlationId": "933613657e1c8fcf",
"endTime": 1564039524182,
"entityId": {
"entityId": {
"id": "The ID of the entity.",
"type": "The type of the entity."
},
"name": "The name of the entity. \n\n Not included in the response in case no entity with the relevant ID was found."
},
"entityTags": [
{
"context": "The origin of the tag, such as AWS or Cloud Foundry. \n\n Custom tags use the `CONTEXTLESS` value.",
"key": "The key of the tag.",
"stringRepresentation": "The string representation of the tag.",
"value": "The value of the tag."
}
],
"eventId": "4293884258445543163_1564039524182",
"eventType": "LOW_DISK_SPACE",
"frequentEvent": false,
"managementZones": [
{
"id": "The ID of the management zone.",
"name": "The name of the management zone."
}
],
"properties": [
{
"key": "The key of the event property.",
"value": "The value of the event property."
}
],
"startTime": 1564039524182,
"status": "OPEN",
"suppressAlert": false,
"suppressProblem": false,
"title": "High CPU load on host X",
"underMaintenance": false
}
],
"nextPageKey": "AQAAABQBAAAABQ==",
"pageSize": 0,
"totalCount": 0,
"warnings": [
"string"
]
}
Workflow Library Example
List Events with Dynatrace and Send Results Via Email
Preview this Workflow on desktop