UDP Tests

UDP Tests


UDP tests allow you to easily monitor that low-level UDP connections can be established on the ports of given hosts, ensuring availability of any services living on UDP ports. With built-in response time data, you can keep track of the performance of your network applications and be alerted in case of unexpected slowness.

UDP tests can run from both managed and private locations depending on your preference for running the test from outside or inside your network. UDP tests can run on a schedule, on-demand, or directly within your CI/CD pipelines.


After choosing to create an UDP Test, define your test’s request.

Define request

  1. Specify the Host and Port to run your test on. By default, the port is set to 443.
  2. Enter the string you want to send in your test.
  3. Specify the amount of time in seconds before the test times out.
  4. Name your UDP test.
  5. Add env Tags as well as any other tag to your UDP test. You can then use these tags to quickly filter through your Synthetic tests on the Synthetic Monitoring homepage.

Click Test URL to try out the request configuration. A response preview is displayed on the right side of your screen.

Define assertions

Assertions define what an expected test result is. When you click Test URL, a basic assertion on response time is added. You must define at least one assertion for your test to monitor.

TypeOperatorValue Type
response timeis less thanInteger (ms)
string responsecontains, does not contain, is, is not,
matches, does not match

Select the response preview directly or click New Assertion to create an assertion. You can create up to 20 assertions per UDP test.

Select locations

Select the Locations to run your UDP test from. UDP tests can run from both managed and private locations depending on your preference for running the test from outside or inside your network.

Specify test frequency

UDP tests can run:

  • On a schedule to ensure your most important services are always accessible to your users. Select the frequency at which you want Datadog to run your UDP test.
  • Within your CI/CD pipelines.
  • On-demand to run your tests whenever makes the most sense for your team.

Define alert conditions

You can set alert conditions to determine the circumstances under which a test should fail and trigger an alert.

Fast retry

Your test can trigger retries X times after Y ms in case of a failed test result. Customize the retry interval to suit your alerting sensibility.

Location uptime is computed on a per-evaluation basis (whether the last test result before evaluation was up or down). The total uptime is computed based on the configured alert conditions. Notifications sent are based on the total uptime.

Alerting rule

When you set the alert conditions to An alert is triggered if your test fails for X minutes from any n of N locations, an alert is triggered only if these two conditions are true:

  • At least one location was in failure (at least one assertion failed) during the last X minutes;
  • At one moment during the last X minutes, at least n locations were in failure.

Notify your team

A notification is sent by your test based on the alerting conditions previously defined. Use this section to define how and what to message to send to your teams.

  1. Similar to how you configure monitors, select users and/or services that should receive notifications either by adding an @notificationto the message or by searching for team members and connected integrations with the drop-down box.

  2. Enter the notification message for your test. This field allows standard Markdown formatting and supports the following conditional variables:

    Conditional VariableDescription
    {{#is_alert}}Show when the test alerts.
    {{^is_alert}}Show unless the test alerts.
    {{#is_recovery}}Show when the test recovers from alert.
    {{^is_recovery}}Show unless the test recovers from alert.
  3. Specify how often you want your test to re-send the notification message in case of test failure. To prevent renotification on failing tests, leave the option as Never renotify if the monitor has not been resolved.

Click Save to save and start your test.


Create local variables

To create a local variable, click Create Local Variable at the top right hand corner. You can define the value from one of the following available builtins:

{{ numeric(n) }}
Generates a numeric string with n digits.
{{ alphabetic(n) }}
Generates an alphabetic string with n letters.
{{ alphanumeric(n) }}
Generates an alphanumeric string with n characters.
{{ date(n unit, format) }}
Generates a date in one of our accepted formats with a value corresponding to the date the test is initiated at +/- n chosen unit.
{{ timestamp(n, unit) }}
Generates a timestamp in one of our accepted units with a value corresponding to the timestamp the test is initiated at +/- n chosen unit.

When you have entered a name and a value, click Add Variable. (standardize this sentence)

Use variables

You can use the global variables defined in Settings and locally defined variables in the URL and assertions of your UDP tests.

To display your list of variables, type {{ in your desired field:

Test failure

A test is considered FAILED if it does not satisfy one or more assertions or if the request prematurely failed. In some cases, the test can fail without testing the assertions against the endpoint.

These reasons include the following:

The connection was abruptly closed by the remote server. Possible causes include the web server encountering an error or crashing while responding, or loss of connectivity of the web server.
DNS entry not found for the test URL. Possible causes include misconfigured test URL or the wrong configuration of your DNS entries.
The configuration of the test is invalid (for example, a typo in the URL).
The request couldn’t be completed in a reasonable time. Two types of TIMEOUT can happen:
  • TIMEOUT: The request couldn’t be completed in a reasonable time. indicates that the timeout happened at the TCP socket connection level.
  • TIMEOUT: Retrieving the response couldn’t be completed in a reasonable time. indicates that the timeout happened on the overall run (which includes TCP socket connection, data transfer, and assertions).


By default, only users with the Datadog Admin and Datadog Standard roles can create, edit, and delete Synthetic UDP tests. To get create, edit, and delete access to Synthetic UDP tests, upgrade your user to one of those two default roles.

If you have access to the custom role feature, add your user to any custom role that includes synthetics_read and synthetics_write permissions.

Further Reading