개요

DNS 테스트로 어떤 네임서버를 사용하든 DNS 레코드의 조회와 조회 시간을 사전에 모니터링할 수 있습니다. 조회 확인이 예상보다 느리거나 DNS 서버가 A, AAAA, CNAME, TXT 또는 MX 형식으로 응답하는 경우, Datadog이 해당 오류에 관한 세부 정보가 포함된 알림을 전송하여 오류의 근본 원인을 신속하게 파악하고 해결할 수 있도록 도와드립니다.

DNS 테스트는 네트워크 외부에서 또는 내부에서 실행할지 선호도에 따라 관리 위치비공개 위치에서 모두 실행할 수 있습니다. DNS 테스트는 일정에 맞추어서, 온디맨드 또는 CI/CD 파이프라인 내에서 직접 실행할 수 있습니다.

설정

DNS 테스트 생성을 선택한 다음 테스트 요청을 정의합니다.

요청 정의하기

  1. 테스트할 도메인을 쿼리로 지정합니다. 예: www.example.com.
  2. 사용할 DNS 서버를 지정합니다(옵션). 이는 도메인 이름이나 IP 주소일 수 있습니다. 지정하지 않으면 DNS 테스트는 1.1.1.1 및 내부 AWS DNS 서버의 대체 패턴(폴백)으로 8.8.8.8를 통해 사용하여 조회 작업을 수행합니다.
  3. DNS 서버 포트를 지정합니다(옵션). 지정하지 않으면 DNS 서버 포트는 기본값으로 53으로 설정됩니다.
  4. 테스트 시간 초과로 간주하기까지의 시간을 초단위로 지정합니다(옵션).
  5. DNS 테스트의 이름을 지정합니다.
  6. DNS 테스트에 env 태그 및 기타 태그를 추가합니다. 이러한 태그를 사용하여 신서틱 모니터링 & 지속적인 테스트 페이지에서 신서틱 테스트를 필터링할 수 있습니다.
DNS 쿼리 정의

URL 테스트를 클릭하여 요청 설정을 테스트합니다. 화면 오른쪽에 응답 미리보기가 표시됩니다.

어서션(표명) 정의하기

어서션은 예상되는 테스트 결과를 정의합니다. ** URL 테스트**를 클릭하면 response time의 기본 어서션과 사용 가능한 레코드가 추가됩니다. 테스트를 모니터링하려면 최소 한 개 이상의 어서션을 정의해야합니다.

유형레코드 유형연산자가치 유형
응답 시간is less thanInteger (ms)
사용 가능한 레코드A, AAAA, CNAME, MX, NS 및 TXT 형식is, contains,
matches, does not match
String
Regex
레코드 최소 하나 이상A, AAAA, CNAME, MX, NS 및 TXT 형식is, contains,
matches, does not match
String
Regex

신규 어서션을 클릭하거나 응답 미리보기를 클릭하여 API 테스트당 최대 20개의 어서션을 생성할 수 있습니다.

성공 또는 실패로 DNS 테스트 어서션 정의

어서션에서 OR 로직을 수행하려면 matches regex 비교기(comparator)를 사용하여 (0|100)과 같은 동일한 어서션 유형에 대해 다중 예상치가 존재하는 정규식을 정의합니다. 사용 가능한 모든 레코드나 최소 하나 이상의 레코드 어서션 값이 0 또는 100이면 테스트가 성공한 것입니다.

테스트에 응답 본문에 대한 어션이 포함되어 있지 않으면 본문 페이로드가 삭제되고 Synthetics Worker가 설정한 제한 시간 내에서 요청에 대한 관련 응답 시간을 반환합니다.

테스트에 응답 본문에 대한 어서션이 포함되어 있고 제한 시간 제한에 도달하면, Assertions on the body/response cannot be run beyond this limit 오류가 나타납니다.

위치 선택

DNS API 테스트의 위치를 선택합니다. DNS 테스트는 공개 또는 비공개 도메인 모니터링 선호도에 따라 관리되는 위치 및 프라이빗 위치에서 모두 실행할 수 있습니다.

Datadog’s out-of-the-box managed locations allow you to test public-facing websites and endpoints from regions where your customers are located.

AmericasAPACEMEA
Canada Central (AWS)Hong Kong (AWS)Cape Town (AWS)
Northern California (AWS)Mumbai (AWS)Frankfurt (AWS)
Northern Virginia (AWS)Seoul (AWS)Ireland (AWS)
Ohio (AWS)Singapore (AWS)London (AWS)
Oregon (AWS)Sydney (AWS)Paris (AWS)
São Paulo (AWS)Tokyo (AWS)Stockholm (AWS)
Virginia (Azure)Osaka (AWS)Milan (AWS)
Jakarta (AWS)Bahrain (AWS)

The Datadog for Government site (US1-FED) uses the following managed location:

Americas
US-West

테스트 빈도 지정

다음과 같이 DNS 테스트를 수행합니다.

  • 일정에 따라 사용자가 가장 중요한 서비스에 항상 액세스할 수 있도록 보장합니다. Datadog이 DNS 테스트를 실행할 빈도를 선택하세요.
  • ** CI/CD 파이프라인 내**.
  • 온디맨드로 팀에 가장 적합한 시간에 테스트를 실행할 수 있습니다.

Define alert conditions

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.

  1. 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.

  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.
    {{ #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).
  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.

  4. Click Create to save your test configuration and monitor.

For more information, see Using Synthetic Test Monitors.

Variables

Create local variables

To create a local variable, click Create a Local Variable. 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).

To obfuscate local variable values in test results, select Hide and obfuscate variable value. Once you have defined the variable string, click Add Variable.

변수 사용

설정 페이지에 정의된 전역 변수를 DNS 테스트의 URL, 고급 옵션 및 어서션에 사용할 수 있습니다.

변수 목록을 표시하려면 원하는 필드에 {{를 입력하세요.

테스트 실패

하나 이상의 어서션을 충족하지 않거나 요청이 초기에 실패한 경우 테스트는 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 관리자 및 Datadog 표준 역할로 설정된 사용자만 신서틱(Synthetic) DNS 테스트를 생성, 편집, 삭제할 수 있습니다. 신서틱(Synthetic) DNS 테스트 생성, 편집, 삭제, 접근 권한을 얻으려면 사용자를 이 두 가지 [기본 역할][13] 중 하나로 업그레이드하세요.

커스텀 역할 기능을 사용하는 경우 synthetics_readsynthetics_write 권한을 포함하는 모든 커스텀 역할에 사용자를 추가합니다.

액세스 제한

커스텀 역할로 설정된 계정 고객의 경우 액세스 제한이 가능합니다.

조직 내 역할에 따라 DNS 테스트 액세스를 제한할 수 있습니다. DNS 테스트 생성 시 사용자 외에도 어떤 역할이 해당 테스트를 읽고 쓸 수 있는지 선택하세요.

테스트에 대한 권한 설정

참고 자료