Información general

Los tests ICMP te permiten monitorizar la disponibilidad de tus hosts y diagnosticar problemas de comunicación de red. Al aplicar aserciones a los valores recibidos de uno o más pings de ICMP a tu endpoint, Datadog puede ayudarte a detectar problemas de conectividad, latencia por encima de la cuota de tiempos de ida y vuelta y cambios inesperados en la configuración del firewall de seguridad. Los tests también pueden hacer un seguimiento el número de saltos de red (TTL) necesarios para conectarse a tu host y ver los resultados de traceroute para analizar los detalles de cada salto de red que se produce en la ruta.

Los tests ICMP pueden ejecutarse tanto desde localizaciones gestionadas como de localizaciones privadas dependiendo de si quieres activar pings de ICMP a tus endpoints desde fuera o dentro de tu red. Los tests ICMP pueden ejecutarse de forma programada, bajo demanda o directamente dentro de tus pipelines CI/CD.

Configuración

Puedes crear un test utilizando una de las siguientes opciones:

  • Crea un test a partir de una plantilla:

    1. Pasa el ratón por encima de una de las plantillas ya rellenadas y haz clic en View Template (Ver plantilla). Se abrirá un panel lateral en el que se mostrará la información de configuración rellenada previamente, que incluye: detalles de tests, detalles de solicitudes, aserciones, condiciones de alerta y parámetros de monitor.
    2. Haz clic en +Create Test (+Crear test) para abrir la página Definir solicitud, en la que podrás revisar y editar las opciones de configuración rellenadas previamente. Los campos presentados son idénticos a aquellos disponibles cuando se crea un test desde cero.
    3. Haz clic en Save Details (Guardar detalles) para enviar tu test de API.

  • Crea un test desde cero:

    1. Para crear un test desde cero, haz clic en la plantilla + Start from scratch (+ Empezar desde cero) y selecciona el tipo de solicitud ICMP.
    2. Especifica el nombre de dominio o la dirección IP donde quieres que se ejecute tu test.
    3. Selecciona o deselecciona Seguimiento del número de saltos de red (TTL). Cuando se selecciona, esta opción activa un probe “traceroute” para detectar todas las puertas de enlace en la ruta que lleva al host de destino.
    4. Elige el Número de pings que se deben activar por sesión de test. Por defecto, el número de pings es cuatro. Puedes bajarlo o aumentarlo hasta un máximo de diez.
    5. Pon un nombre a tu test ICMP.
    6. Añade etiquetas (tags) de entorno así como cualquier otra etiqueta a tu test ICMP. A continuación, puedes utilizar estas etiquetas para filtrar tus tests Synthetic en la página de monitorización Synthetic y tests continuos.
    7. Haz clic en *Test Host (Probar host) para probar la configuración de la solicitud. Aparecerá una vista previa de la respuesta en la parte derecha de la pantalla.

    Definir una solicitud ICMP
    8. Haz clic en Create Test (Crear test) para enviar tu test de API.

Fragmentos

When setting up a new Synthetic Monitoring API test, use snippets to automatically fill in basic auth, performance, and regions, rather than selecting these options manually. The following snippets are available:

  • Basic Auth: Automatically test your APIs using pre-populated basic auth headers, JavaScript, bearer token, and API/app key auth variables.

  • Performance: Automatically configure a test with the shortest frequency (one minute), perform a gRPC health check, and test for overall response time latency with a breakdown of network timing.

  • Regions: Automatically test your API endpoint against a location in each of the three primary geographic regions (AMER, APAC and EMEA).

    Screenshot of the left hand side of an API test creation, showing the snippets example

Definición de aserciones

Las aserciones definen cuál es el resultado esperado de un test. Después de hacer clic en URL del test, se añaden las aserciones básicas en latency, packet loss y packet received. Debes definir al menos una aserción para que sea monitorizada por tu test.

TipoAgregaciónOperadorTipo de valor
latenciaavg, max, min o stddev (también llamado jitter)is less than, is less than or equal,
is, is more than, is more than or equal
Entero (ms)
pérdida de paquetes-is less than, is less than or equal, is, is more than, is more than or equalPorcentaje (%)
paquetes recibidos-is less than, is less than or equal, is, is more than, is more than or equalEntero
saltos de red-is less than, is less than or equal, is, is more than, is more than or equalEntero

Puedes crear hasta 20 aserciones por test de API haciendo clic en Nueva aserción o haciendo clic directamente en la vista previa de la respuesta:

Definir aserciones en las que tu test ICMP tenga éxito o falle

Si un test no contiene una aserción en el cuerpo de la respuesta, la carga útil del cuerpo cae y devuelve un tiempo de respuesta asociado para la solicitud dentro del límite de tiempo de espera establecido por el worker de Synthetics.

Si un test contiene una aserción en el cuerpo de la respuesta y se alcanza el límite de tiempo de espera, aparecerá el error Assertions on the body/response cannot be run beyond this limit.

Seleccionar localizaciones

Selecciona las Localizaciones desde donde ejecutar tu test ICMP. Los tests ICMP pueden ejecutarse desde localizaciones gestionadas y también privadas, en función de si prefieres activar pings de ICMP desde fuera o desde dentro de tu red.

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

Indicar la frecuencia del test

Los tests ICMP se pueden ejecutar:

  • De forma programada para garantizar que los servicios más importantes siempre resulten accesibles para tus usuarios. Selecciona la frecuencia con la que quieres que Datadog ejecute tu test ICMP.
  • Dentro de tus pipelines CI/CD.
  • Bajo demanda para ejecutar tus tests cuando sea más conveniente para tu equipo.

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.

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

Usar variables

Puedes utilizar las variables globales definidas en la página Parámetros en la URL y las aserciones de tus tests ICMP.

Para visualizar tu lista de variables, escribe {{ en el campo de tu elección.

Fallo del test

Un test se considera FAILED si no satisface una o más aserciones o si la solicitud ha fallado prematuramente. En algunos casos, el test puede fallar sin comprobar las aserciones respecto al endpoint.

Entre las razones figuran las siguientes:

DNS: No se ha encontrado la entrada DNS para la URL del test. Entre las posibles causas se incluyen una URL de test mal configurada o una configuración incorrecta de las entradas DNS.

Permisos

De manera predeterminada, sólo los usuarios con los roles de administrador de Datadog y estándar de Datadog pueden crear, editar y eliminar tests ICMP Synthetic. Para crear, editar y eliminar tests ICMP Synthetic, actualiza tu usuario a uno de esos dos roles predeterminados.

Si estás utilizando la función de rol personalizado, añade tu usuario a cualquier rol que incluya permisos synthetics_read y synthetics_write.

Restringir el acceso

Use granular access control to limit who has access to your test based on roles, teams, or individual users:

  1. Open the permissions section of the form.
  2. Click Edit Access.
Set permissions for your test from Private Locations configuration form
  1. Click Restrict Access.
  2. Select teams, roles, or users.
  3. Click Add.
  4. Select the level of access you want to associate with each of them.
  5. Click Done.
Note: You can view results from a Private Location even without Viewer access to that Private Location.
Access levelView test configurationEdit test configurationView test resultsRun test
No access
ViewerYesYes
EditorYesYesYesYes

Referencias adicionales