Synthetic NAM API v2 - Create synthetic monitor definition

  • Reference
  • Published Jul 08, 2024

Creates a new synthetic network availability monitor. For more details about network availability monitor creation, see Create a NAM monitor.

The request consumes and produces an application/json payload.

POSTManagedDynatrace for Governmenthttps://{your-domain}/e/{your-environment-id}/api/v2/synthetic/monitors
Environment and Cluster ActiveGate (default port 9999)https://{your-activegate-domain}:9999/e/{your-environment-id}/api/v2/synthetic/monitors

Authentication

To execute this request, you need an access token with settings.write scope.

To learn how to obtain and use it, see Tokens and authentication.

Parameter

To find all model variations that depend on the type of the model, see JSON models.

ParameterTypeDescriptionInRequired
bodySyntheticMultiProtocolMonitorRequest

The JSON body of the request. Contains the parameters of the monitor.

bodyRequired

Request body objects

The SyntheticMultiProtocolMonitorRequest object

Network Availability monitor.

ElementTypeDescriptionRequired
descriptionstring

Monitor description

Optional
enabledboolean

If true, the monitor is enabled.

Optional
frequencyMininteger

The frequency of the monitor, in minutes.

Optional
locationsstring[]

The locations to which the monitor is assigned.

Required
namestring

The name of the monitor.

Required
performanceThresholdsSyntheticMonitorPerformanceThresholdsDto

Performance thresholds configuration.

Optional
primaryGrailTagsSyntheticMonitorPrimaryGrailTagDto[]

Primary Grail tags as a list of key-value pairs. Up to 10 tags. Those fields are only available for SaaS and not for Managed.

Optional
stepsSyntheticMultiProtocolMonitorStepDto[]

The steps of the monitor.

Required
syntheticMonitorOutageHandlingSettingsSyntheticMonitorOutageHandlingSettingsDto

Outage handling configuration.

Optional
tagsSyntheticTagWithSourceDto[]

A set of tags assigned to the monitor.

You can specify only the value of the tag here and the CONTEXTLESS context and source 'USER' will be added automatically. But preferred option is usage of SyntheticTagWithSourceDto model.

Optional
typestring

Monitor type.

The element can hold these values
  • MULTI_PROTOCOL
  • BROWSER
Required

The SyntheticMonitorPerformanceThresholdsDto object

Performance thresholds configuration.

ElementTypeDescriptionRequired
enabledboolean

Performance threshold is enabled (true) or disabled (false).

Required
thresholdsSyntheticMonitorPerformanceThresholdDto[]

The list of performance threshold rules.

Optional

The SyntheticMonitorPerformanceThresholdDto object

The performance threshold rule.

ElementTypeDescriptionRequired
aggregationstring

Aggregation type

The element can hold these values
  • AVG
  • MAX
  • MIN
Optional
dealertingSamplesinteger

Number of most recent non-violating request executions that closes the problem.

Optional
samplesinteger

Number of request executions in analyzed sliding window (sliding window size).

Optional
stepIndexinteger

Specify the step's index to which a threshold applies. If threshold is monitor-level, no index is needed.

Optional
thresholdnumber

Notify if monitor request takes longer than X time units to execute. For Network Availability monitors the time unit is milliseconds, for browser monitors - seconds.

Required
typestring

Type of performance threshold.

The element can hold these values
  • MONITOR
  • STEP
Optional
violatingSamplesinteger

Number of violating request executions in analyzed sliding window.

Optional

The SyntheticMonitorPrimaryGrailTagDto object

Primary grail tag key-value pair.

ElementTypeDescriptionRequired
keystring

Tag key.

Required
valuestring

Tag value.

Required

The SyntheticMultiProtocolMonitorStepDto object

The step of a network availability monitor.

ElementTypeDescriptionRequired
constraintsSyntheticMonitorConstraintDto[]

The list of constraints which apply to all requests in the step.

Required
namestring

Step name.

Required
propertiesobject

The properties which apply to all requests in the step.

Required
requestConfigurationsSyntheticMultiProtocolRequestConfigurationDto[]

Request configurations.

Required
requestTypestring

Request type.

The element can hold these values
  • ICMP
  • TCP
  • DNS
Required
targetFilterstring

Target filter.

Optional
targetListstring[]

Target list.

Optional

The SyntheticMonitorConstraintDto object

Synthetic monitor constraint.

ElementTypeDescriptionRequired
propertiesobject

The properties of the constraint.

Required
typestring

Constraint type.

Required

The SyntheticMultiProtocolRequestConfigurationDto object

The configuration of a network availability monitor request.

ElementTypeDescriptionRequired
constraintsSyntheticMonitorConstraintDto[]

Request constraints.

Required

The SyntheticMonitorOutageHandlingSettingsDto object

Outage handling configuration.

ElementTypeDescriptionRequired
globalConsecutiveOutageCountThresholdinteger

Number of consecutive failures for all locations.

Optional
globalOutagesboolean

Generate a problem and send an alert when the monitor is unavailable at all configured locations.

Required
localConsecutiveOutageCountThresholdinteger

Number of consecutive failures.

Optional
localLocationOutageCountThresholdinteger

Number of failing locations.

Optional
localOutagesboolean

Generate a problem and send an alert when the monitor is unavailable for one or more consecutive runs at any location.

Required
originstring

Indicates the origin of these settings.

The element can hold these values
  • MONITOR
  • TENANT
  • DEFAULT
  • UNKNOWN
Required

The SyntheticTagWithSourceDto object

The tag with source of a monitored entity.

ElementTypeDescriptionRequired
contextstring

The origin of the tag, such as AWS or Cloud Foundry.

Custom tags use the CONTEXTLESS value.

Optional
keystring

The key of the tag.

Required
sourcestring

The source of the tag, such as USER, RULE_BASED or AUTO.

The element can hold these values
  • AUTO
  • RULE_BASED
  • USER
Optional
valuestring

The value of the tag.

Optional

Request body JSON model

This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.

{
"description": "My network availability monitor description",
"enabled": "true",
"frequencyMin": "60",
"locations": [
"SYNTHETIC_LOCATION-D3A5BFD8676A4F19"
],
"name": "My network availability monitor",
"performanceThresholds": {
"enabled": "true",
"thresholds": [
{
"aggregation": "AVG",
"dealertingSamples": "5",
"samples": "5",
"stepIndex": "0",
"threshold": "200",
"violatingSamples": "3"
}
]
},
"primaryGrailTags": [
{
"key": "sample key",
"value": "sample value"
},
{
"key": "another sample key",
"value": "another sample value"
}
],
"steps": [
{
"constraints": [
{
"properties": {
"operator": ">=",
"value": "95"
},
"type": "SUCCESS_RATE_PERCENT"
}
],
"name": "Step 1",
"properties": {
"ICMP_IP_VERSION": "4",
"ICMP_NUMBER_OF_PACKETS": "8",
"ICMP_TIMEOUT_FOR_REPLY": "PT1S"
},
"requestConfigurations": [
{
"constraints": [
{
"properties": {
"operator": "=",
"value": "100"
},
"type": "ICMP_SUCCESS_RATE_PERCENT"
}
]
}
],
"requestType": "ICMP",
"targetFilter": "ipMask == 127.0.0.1/24",
"targetList": [
"127.0.0.1",
"127.0.0.2"
]
}
],
"syntheticMonitorOutageHandlingSettings": {
"globalConsecutiveOutageCountThreshold": "1",
"globalOutages": "true",
"localConsecutiveOutageCountThreshold": "3",
"localLocationOutageCountThreshold": "3",
"localOutages": "true"
},
"tags": [
{
"key": "sample key",
"value": "sample value"
},
{
"key": "sample key"
}
],
"type": "MULTI_PROTOCOL"
}

Response

Response codes

CodeTypeDescription
200MonitorEntityIdDto

Success

4XXErrorEnvelope

Client side error.

5XXErrorEnvelope

Server side error.

Response body objects

The MonitorEntityIdDto object

A DTO for monitor entity ID.

ElementTypeDescription
entityIdstring

Monitor entity ID.

The ErrorEnvelope object

ElementTypeDescription
errorError-

The Error object

ElementTypeDescription
codeinteger

The HTTP status code

constraintViolationsConstraintViolation[]

A list of constraint violations

messagestring

The error message

The ConstraintViolation object

A list of constraint violations

ElementTypeDescription
locationstring-
messagestring-
parameterLocationstring-
The element can hold these values
  • HEADER
  • PATH
  • PAYLOAD_BODY
  • QUERY
pathstring-

Response body JSON models

{
"entityId": "MULTIPROTOCOL_MONITOR-63653CB579F573D1"
}
{
"error": {
"code": 1,
"constraintViolations": [
{
"location": "string",
"message": "string",
"parameterLocation": "HEADER",
"path": "string"
}
],
"message": "string"
}
}