TCP 테스트를 사용하면 특정 호스트의 포트에 낮은 수준의 TCP 연결이 설정될 수 있는지 여부를 모니터링하여 SSH (22), SMTP (25), DNS (53), HTTPS 기반 VPN (443), 그리고 다른 포트에 있는 모든 커스텀 서비스와 같은 여러 주요 서비스의 가용성을 보장할 수 있습니다. 내장된 응답 시간 데이터를 사용하여 네트워크 애플리케이션의 성능을 추적하고 예상치 못한 속도 저하가 발생할 경우 알림을 받습니다.
TCP 테스트는 네트워크 외부 또는 내부에서 테스트를 실행하려는 사용자 선호도에 따라 관리형 및 프라이빗 위치 모두에서 실행할 수 있습니다. TCP 테스트는 일정에 따라, 주문형으로 또는 CI/CD 파이프라인 내에서 직접 실행할 수 있습니다.
설정
TCP 테스트 생성을 선택한 후 테스트 요청을 정의합니다.
요청 정의하기
테스트를 실행할 Host 및 Port를 지정합니다.
Track number of network hops (TTL) 사용 여부를 결정합니다. 이 옵션을 사용하면 네트워크 홉의 개수를 확인하고 테스트 결과에서 TCP Traceroute에 액세스할 수 있습니다.
Set alert conditions to determine the circumstances under which you want a test to fail and trigger an alert.
Alerting rule
When you set the alert conditions to: An alert is triggered if any assertion 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.
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.
Configure the test monitor
A notification is sent by your test based on the alerting conditions previously defined. Use this section to define how and what to message your team.
Similar to how you configure monitors, select users and/or services that should receive notifications either by adding an @notification to the message or by searching for team members and connected integrations with the dropdown menu.
Enter the notification message for your test or use pre-filled monitor messages. This field allows standard Markdown formatting and supports the following conditional variables:
Conditional Variable
Description
{{#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.
{{#is_renotify}}
Show when the monitor renotifies.
{{^is_renotify}}
Show unless the monitor renotifies.
{{#is_priority}}
Show when the monitor matches priority (P1 to P5).
{{^is_priority}}
Show unless the monitor matches priority (P1 to P5).
Notification messages include the message defined in this section and information about the failing locations. Pre-filled monitor messages are included in the message body section:
Specify how often you want your test to re-send the notification message in case of test failure. To prevent renotification on failing tests, check the option Stop re-notifying on X occurrences.
Click Save & Start Recording to save your test configuration and monitor.
To create a local variable, click + All steps > Variables. You can select one of the following available builtins to add to your variable string:
{{ 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 Datadog’s accepted formats with a value corresponding to the UTC date the test is initiated at + or - n units.
{{ timestamp(n, unit) }}
Generates a timestamp in one of Datadog’s accepted units with a value corresponding to the UTC timestamp the test is initiated at +/- n units.
{{ uuid }}
Generates a version 4 universally unique identifier (UUID).
{{ public-id }}
Injects the Public ID of your test.
{{ result-id }}
Injects the Result ID of your test run.
To obfuscate local variable values in test results, select Hide and obfuscate variable value. Once you have defined the variable string, click Add Variable.
하나 이상의 어서션을 충족하지 않거나 요청이 초기에 실패한 경우 테스트는 FAILED로 간주됩니다. 경우에 따라서는 엔드포인트 어서션 테스트 없이 해당 테스트가 실패할 수 있습니다.
다음과 같은 이유가 있습니다.
CONNRESET
원격 서버에 의해 연결이 갑자기 종료되었습니다. 가능한 원인으로는 웹 서버가 응답 도중 오류 또는 충돌이 발생하였거나 웹 서버의 연결이 끊어졌기 때문일 수 있습니다.
DNS
테스트 URL에 대한 DNS 엔트리를 찾을 수 없습니다. 가능한 원인으로는 테스트 URL이 잘못 설정되었거나 DNS 엔티티 설정이 잘못되었기 때문일 수 있습니다.
INVALID_REQUEST
테스트 구성이 유효하지 않습니다(예: URL에 오타가 있습니다).
TIMEOUT
요청을 적절한 시간 내에 완료할 수 없습니다. 두 가지 유형의 TIMEOUT이 발생할 수 있습니다:
TIMEOUT: The request couldn't be completed in a reasonable time.는 요청 기간이 테스트에 정의된 시간 제한에 도달했음을 나타냅니다(기본값은 60초로 설정됨).
각 요청에 대해 완료된 요청 단계만 네트워크 폭포에 표시됩니다. 예를 들어, Total response time만 표시되는 경우 DNS 확인 중에 시간 초과가 발생했습니다.
TIMEOUT: Overall test execution couldn't be completed in a reasonable time.은 요청 및 어서션 실행 시간이 최대 실행 시간(60.5초)에 도달했음을 나타냅니다.
권한 허용
기본적으로 Datadog Admin 및 Datadog Standard 역할이 있는 사용자만 Synthetic TCP 테스트를 생성, 편집, 삭제할 수 있습니다. Synthetic TCP 테스트의 생성, 편집, 삭제 액세스 권한을 얻으려면 사용자를 두 가지 기본 역할 중 하나로 업그레이드하세요.
커스텀 역할 기능을 사용하는 경우 synthetics_read 및 synthetics_write 권한이 포함된 사용자 정의 역할에 사용자를 추가하세요.