Alerts API - GET all alert definitions

Applies to NAM 2019+

Returns definitions of all defined alerts.

GET
  • url https://{console-host}:{console-port}/cxf/api/v1/config/alerts/definitions

Parameters

Parameter Type Description In Required
name

Include only alerts whose name contains the specified text.

query optional
type

Include only alerts with the specified type.

query optional
namServer

Include only alerts on the specified NAM Server.

query optional
config

If set to true, the configuration part will be included.

query optional

Possible values

Possible values for the schema element:

  • METRIC_ALM
  • TRANSMETRIC_ALM
  • TRANSACTIVE_METRIC_ALM
  • GOMEZSTEP_METRIC_ALM
  • GOMEZTEST_METRIC_ALM
  • CITRIXMETRIC_ALM
  • LINK_ALM
  • METRIC_ALM_P2P
  • TIERMETRIC_ALM
  • AMD_DRIVER_ALM
  • AMD_INTERFACE_ALM
  • AMD_SERVER_ALM
  • ESM_METRIC_ALM
  • SYSTEM

Response format

The AlertPublicRestErrorResponse object

Element Type Description
errorCode string
errorMessage string

The AlertPublicRestDescriptor object

Element Type Description
name string
type string
namServers string[]

The AlertPublicRest object

Element Type Description
name string

Alert name. Must be unique if you want to use the API.

type string
  • METRIC_ALM = Real user performance (probe)
  • TRANSMETRIC_ALM = Operation sequences
  • TRANSACTIVE_METRIC_ALM = Enterprise synthetic
  • CITRIXMETRIC_ALM = Citrix/WTS hardware
  • LINK_ALM = Network link
  • METRIC_ALM_P2P = Internetwork traffic
  • TIERMETRIC_ALM = Application user experience
  • AMD_DRIVER_ALM = NAM Probe driver statistics
  • AMD_INTERFACE_ALM = NAM Probe interface statistics
  • AMD_SERVER_ALM = NAM Probe server statistics
  • ESM_METRIC_ALM = Agent health statistics (obsolete)
  • SYSTEM = System Maintanance (this type is for internal purposes only, it is not allowed in API)
description string
definition AlertDefinition
detectionSettings AlertDetectionSettings
propagationSettings AlertPropagationSettings
notificationSettings AlertNotificationSettings
recipientIds integer[]

Identifiers of recipients that will receive alert notifications.

namServers string[]

List of NAM Servers on which the alert definition resides.

The AlertNotificationSettings object

Element Type Description
disabled boolean

If set to true, no notification will be send out of this alert.

aggregated boolean

Aggregate notifications for this alert into a single email. Applies only to email notifications.

message string

Type the message to send when the alert occurs. (To display metric/dimension values or use macros, the mnemonics enclosed in {} need to be used. The format is different than in the UI).

subject string

Email subject.

snmpmessage string

Message for SNMP traps.

The AlertPropagationSettings object

  • entrySignalProperties = Raise alert after conditions are met for the specified number of consecutive intervals
  • exitSignalProperties = Cancel alert after conditions are not met for the specified number of consecutive intervals
  • abortSignalProperties = Abort alert after the specified time
  • recallSignalProperties = Reissue alert after the specified number of intervals
Element Type Description
entrySignalProperties AlertSignalPropertiesIntervals
exitSignalProperties AlertSignalPropertiesIntervals
abortSignalProperties AlertSignalPropertiesMinutes
recallSignalProperties AlertSignalPropertiesIntervals
notifyNoTraffic string

Defines what to do when no traffic was observed:

  • NOTIFIABLE_ON_RAISING = The alert conditions are met
  • NOTIFIABLE_ON_CANCELLING = The alert conditions are not met
  • UNNOTIFIABLE = Perform no action and wait for traffic

The AlertSignalPropertiesMinutes object

Element Type Description
minutes integer
description string

The AlertSignalPropertiesIntervals object

Element Type Description
intervals integer
description string

The AlertDetectionSettings object

Element Type Description
disabled boolean

Is alert disabled?

timeRange integer

Note: 1 is a special value meaning 1 monitoring interval. Other values specify a time range in minutes.

frequency integer

Note: 1 is a special value meaning 1 monitoring interval. Other values specify a time range in minutes. Frequency must be less than or equal to timeRange.

The AlertDefinition object

Element Type Description
dimensionConditions AlertCondition[]
metricConditions AlertCondition[]
outputFilter string

The AlertCondition object

Element Type Description
id string

Metric or dimension ID.

filter string

Filter value for the specified metric or dimension. For metrics, it should start with <, >, <=, or >=

filterType string
  • NONE = for internal purposes only. Do not use
  • DIMENSION = Dimension and Filter
  • DIMENSION_FILTER_ONLY = Only filtering for dimension
  • METRIC_VALUE = Metric value type condition
  • METRIC_BASELINE_ABSOLUTE = Absolute baseline type condition
  • METRIC_BASELINE_RELATIVE = Relative baseline type condition
  • METRIC_AUXILARY = Auxiliary metric
negateFilter boolean

If true, the value of the filter will be negated.

expression string

Compound metric expression. Ignored for dimension type conditions.

Response codes

Code Description
200

Definitions of all defined alerts.

404

The NAM Server passed as a filter was not found.

Example

Curl

curl -X GET \
  "https://mySampleEnv.live.dynatrace.com/cxf/api/v1/config/alerts/definitions" \
  -H "accept: application/json"

Request URL

https://mySampleEnv.live.dynatrace.com/cxf/api/v1/config/alerts/definitions

Response body

[
  {
    "name": "4 metrics alert example",
    "type": "METRIC_ALM",
    "namServers": [
      "mySampleEnv.live.dynatrace.com"
    ]
  },
  {
    "name": "operation time vs baseline on application's frontend",
    "type": "TIERMETRIC_ALM",
    "namServers": [
      "mySampleEnv.live.dynatrace.com"
    ]
  },
]

Response code

200