Traefik Mesh

Supported OS Linux Windows Mac OS

Versión de la integración2.2.0

Información general

Traefik Mesh es una malla de servicio ligera y fácil de desplegar que ofrece funciones avanzadas de gestión del tráfico, seguridad y observabilidad para aplicaciones de microservicios, aprovechando las capacidades del proxy de Traefik. Con la integración de Traefik de Datadog, puedes:

  • Obtén información sobre el tráfico que entra en tu malla de servicio.
  • Obtén información crítica sobre el rendimiento, la fiabilidad y la seguridad de cada servicio dentro de tu malla, lo que garantiza que tus servicios funcionan de forma eficiente y ayuda a identificar y resolver problemas rápidamente.
  • Obtén información detallada sobre los flujos de tráfico interno dentro de tu malla de servicio, lo que ayuda a monitorizar el rendimiento y garantizar la fiabilidad.

Este check monitoriza Traefik Mesh a través del Datadog Agent.

Configuración

Sigue las siguientes instrucciones para instalar y configurar este check para un Agent que se ejecuta en un host. Para entornos en contenedores, consulta las plantillas de integración de Autodiscovery para obtener orientación sobre la aplicación de estas instrucciones.

Instalación

A partir de la versión del Agent v7.55.0, el check de Traefik Mesh se incluye en el paquete del Datadog Agent. No es necesaria ninguna instalación adicional en tu servidor.

Nota: Este check requiere el Agent v7.55.0 o posterior.

Configuración

Traefik Mesh puede configurarse para exponer las métricas con formato Prometheus. El Datadog Agent puede recopilar estas métricas utilizando la integración descrita a continuación. Sigue las instrucciones para configurar la recopilación de datos para tus instancias de Traefik Mesh. Para las configuraciones requeridas para exponer las métricas de Prometheus, ve la página de Observabilidad en la documentación oficial de Traefik Mesh.

Además, se puede recopilar un pequeño subconjunto de métricas comunicándote con diferentes endpoints de la API. En concreto:

  • /api/version: información sobre la versión del proxy de Traefik.
  • /api/status/nodes: estado de preparación de los nodos visibles por el controlador de Traefik.
  • /api/status/readiness: estado listo del controlador de Traefik.

Nota: Este check utiliza OpenMetrics para la recopilación de métricas, que requiere Python 3.

Contenedores

Recopilación de métricas

Asegúrate de que las métricas con formato Prometheus estén expuestas en tu clúster de Traefik Mesh. Puedes configurar y personalizar esto siguiendo las instrucciones en la página de Observabilidad en la documentación oficial de Traefik Mesh. Para que el Agent empiece a recopilar métricas, los pods de Traefik Mesh deben estar anotados. Para obtener más información acerca de las anotaciones, consulta las plantillas de integración de Autodiscovery para obtener orientación. Puedes encontrar opciones adicionales de configuración revisando el traefik_mesh.d/conf.yaml de ejemplo.

Nota: Las siguientes métricas sólo pueden recopilarse si están disponibles. Algunas métricas sólo se generan cuando se realizan determinadas acciones.

Al configurar el check de Traefik Mesh, puedes utilizar los siguientes parámetros:

  • openmetrics_endpoint: este parámetro debe establecerse en la localización en la que las métricas con formato Prometheus están expuestas. El puerto por defecto es 8082, pero puede configurarse usando el parámetro --entryPoints.metrics.address. En entornos en contenedores, %%host%% puede utilizarse para la autodetección de hosts.
  • traefik_proxy_api_endpooint: este parámetro es opcional. El puerto por defecto es 8080 y puede configurarse usando --entryPoints.traefik.address. En entornos en contenedores, %%host%% puede ser usado para la autodetección de hosts.
  • traefik_controller_api_endpoint: este parámetro es opcional. El puerto por defecto es 9000.

Proxy de Traefik

# (...)
metadata:
  name: '<POD_NAME>'
  annotations:
    ad.datadoghq.com/<CONTAINER_NAME>.checks: |
      {
        "traefik_mesh": {
          "init_config": {},
          "instances": [
            {
              "openmetrics_endpoint": "http://%%host%%:8082/metrics",
              "traefik_proxy_api_endpoint": "http://%%host%%:8080"
            }
          ]
        }
      }      
    # (...)
spec:
  containers:
    - name: <CONTAINER_NAME>
# (...)

Controlador de Traefik

# (...)
metadata:
  name: '<POD_NAME>'
  annotations:
    ad.datadoghq.com/<CONTAINER_NAME>.checks: |
      {
        "traefik_mesh": {
          "init_config": {},
          "instances": [
            {
              "traefik_controller_api_endpoint": "http://%%host%%:9000"
            }
          ]
        }
      }      
    # (...)
spec:
  containers:
    - name: <CONTAINER_NAME>
# (...)

Consulta el traefik_mesh.d/conf.yaml de ejemplo para ver todas las opciones disponibles de configuración.

Recopilación de logs

Disponible para las versiones >6.0 del Agent

Los logs de Traefik Mesh pueden recopilarse de los diferentes pods de Traefik Mesh a través de Kubernetes. La recopilación de logs está deshabilitada por defecto en el Datadog Agent. Para habilitarla, consulta Recopilación de logs de Kubernetes.

Consulta las plantillas de integración de Autodiscovery para obtener orientación sobre la aplicación de los parámetros que se indican a continuación.

ParámetroValor
<LOG_CONFIG>{"source": "traefik_mesh", "service": "<SERVICE_NAME>"}

Validación

Ejecuta el subcomando de estado del Agent y busca traefik_mesh en la sección Checks.

Datos recopilados

Métricas

traefik_mesh.config.last_reload.failure
(gauge)
The last config reload failure
traefik_mesh.config.last_reload.success
(gauge)
The last config reload success
traefik_mesh.config.reloads.count
(count)
The total count of configuration reloads
traefik_mesh.config.reloads.failure.count
(count)
The total count of configuration reload failures
traefik_mesh.entrypoint.open_connections
(gauge)
The current count of open connections on an entrypoint
traefik_mesh.entrypoint.request.duration.seconds.bucket
(count)
Request processing duration histogram on an entrypoint
Shown as second
traefik_mesh.entrypoint.request.duration.seconds.count
(count)
Request processing duration histogram on an entrypoint
Shown as second
traefik_mesh.entrypoint.request.duration.seconds.sum
(count)
Request processing duration histogram on an entrypoint
Shown as second
traefik_mesh.entrypoint.requests.bytes.count
(count)
The total size of HTTP requests in bytes handled by an entrypoint
traefik_mesh.entrypoint.requests.count
(count)
The total count of HTTP requests received by an entrypoint
traefik_mesh.entrypoint.requests.tls.count
(count)
The total count of HTTPS requests received by an entrypoint
traefik_mesh.entrypoint.responses.bytes.count
(count)
The total size of HTTP responses in bytes handled by an entrypoint
traefik_mesh.go.gc.duration.seconds.count
(count)
The summary count of garbage collection cycles in the Traefik Mesh instance
Shown as second
traefik_mesh.go.gc.duration.seconds.quantile
(gauge)
The summary of the pause duration of garbage collection cycles in the Traefik Mesh instance
Shown as second
traefik_mesh.go.gc.duration.seconds.sum
(count)
The sum of the pause duration of garbage collection cycles in the Traefik Mesh instance
Shown as second
traefik_mesh.go.goroutines
(gauge)
The number of goroutines that currently exist in the Traefik Mesh instance
traefik_mesh.go.info
(gauge)
A metric containing the Go version as a tag
traefik_mesh.go.memstats.alloc_bytes
(gauge)
The number of bytes allocated and still in use by the Traefik Mesh instance
Shown as byte
traefik_mesh.go.memstats.alloc_bytes.count
(count)
The total number of bytes allocated - even if freed - for the Traefik Mesh instance
Shown as byte
traefik_mesh.go.memstats.buck_hash.sys_bytes
(gauge)
The number of bytes used by the profiling bucket hash table in the Traefik Mesh instance
Shown as byte
traefik_mesh.go.memstats.frees.count
(count)
The total number of frees in the Traefik Mesh instance
traefik_mesh.go.memstats.gc.cpu_fraction
(gauge)
The fraction of this program's available CPU time used by the GC since the program started in the Traefik Mesh instance
Shown as fraction
traefik_mesh.go.memstats.gc.sys_bytes
(gauge)
The number of bytes used for garbage collection system metadata in the Traefik Mesh instance
Shown as byte
traefik_mesh.go.memstats.heap.alloc_bytes
(gauge)
The number of heap bytes allocated and still in use in the Traefik Mesh instance
Shown as byte
traefik_mesh.go.memstats.heap.idle_bytes
(gauge)
The number of heap bytes waiting to be used in the Traefik Mesh instance
Shown as byte
traefik_mesh.go.memstats.heap.inuse_bytes
(gauge)
The number of heap bytes that are in use in the Traefik Mesh instance
Shown as byte
traefik_mesh.go.memstats.heap.objects
(gauge)
The number of allocated objects in the Traefik Mesh instance
Shown as object
traefik_mesh.go.memstats.heap.released_bytes
(gauge)
The number of heap bytes released to the OS in the Traefik Mesh instance
Shown as byte
traefik_mesh.go.memstats.heap.sys_bytes
(gauge)
The number of heap bytes obtained from system in the Traefik Mesh instance
Shown as byte
traefik_mesh.go.memstats.last_gc_time.seconds
(gauge)
The number of seconds since 1970 of last garbage collection in the Traefik Mesh instance
traefik_mesh.go.memstats.lookups.count
(count)
The number of pointer lookups
traefik_mesh.go.memstats.mallocs.count
(count)
The number of mallocs
traefik_mesh.go.memstats.mcache.inuse_bytes
(gauge)
The number of bytes in use by mcache structures in the Traefik Mesh instance
Shown as byte
traefik_mesh.go.memstats.mcache.sys_bytes
(gauge)
The number of bytes used for mcache structures obtained from system in the Traefik Mesh instance
Shown as byte
traefik_mesh.go.memstats.mspan.inuse_bytes
(gauge)
The number of bytes in use by mspan structures in the Traefik Mesh instance
Shown as byte
traefik_mesh.go.memstats.mspan.sys_bytes
(gauge)
The number of bytes used for mspan structures obtained from system in the Traefik Mesh instance
Shown as byte
traefik_mesh.go.memstats.next.gc_bytes
(gauge)
The number of heap bytes when next garbage collection takes place in the Traefik Mesh instance
Shown as byte
traefik_mesh.go.memstats.other.sys_bytes
(gauge)
The number of bytes used for other system allocations in the Traefik Mesh instance
Shown as byte
traefik_mesh.go.memstats.stack.inuse_bytes
(gauge)
The number of bytes in use by the stack allocator in the Traefik Mesh instance
Shown as byte
traefik_mesh.go.memstats.stack.sys_bytes
(gauge)
The number of bytes obtained from system for stack allocator in the Traefik Mesh instance
Shown as byte
traefik_mesh.go.memstats.sys_bytes
(gauge)
The number of bytes obtained from system in the Traefik Mesh instance
Shown as byte
traefik_mesh.go.threads
(gauge)
The number of OS threads created in the Traefik Mesh instance
Shown as thread
traefik_mesh.node.ready
(gauge)
The current count of ready nodes in the Traefik Mesh instance
traefik_mesh.process.cpu.seconds.count
(count)
The total user and system CPU time spent in seconds in the Traefik Mesh instance
Shown as second
traefik_mesh.process.max_fds
(gauge)
The maximum number of open file descriptors in the Traefik Mesh instance
Shown as file
traefik_mesh.process.open_fds
(gauge)
The number of open file descriptors in the Traefik Mesh instance
Shown as file
traefik_mesh.process.resident_memory.bytes
(gauge)
The resident memory size in bytes in the Traefik Mesh instance
Shown as byte
traefik_mesh.process.start_time.seconds
(gauge)
The start time of the process since unix epoch in seconds in the Traefik Mesh instance
Shown as second
traefik_mesh.process.virtual_memory.bytes
(gauge)
The virtual memory size in bytes in the Traefik Mesh instance
Shown as byte
traefik_mesh.process.virtual_memory.max_bytes
(gauge)
The maximum amount of virtual memory available in bytes in the Traefik Mesh instance
Shown as byte
traefik_mesh.router.open_connections
(gauge)
The current count of open connections for a router
traefik_mesh.router.request.duration.seconds.bucket
(count)
Request processing duration histogram for a router
Shown as second
traefik_mesh.router.request.duration.seconds.count
(count)
Request processing duration histogram for a router
Shown as second
traefik_mesh.router.request.duration.seconds.sum
(count)
Request processing duration histogram for a router
Shown as second
traefik_mesh.router.requests.bytes.count
(count)
The total size of HTTP requests in bytes handled by a router
Shown as byte
traefik_mesh.router.requests.count
(count)
The total count of HTTP requests handled by a router
traefik_mesh.router.requests.tls.count
(count)
The total count of HTTPS requests handled by a router
traefik_mesh.router.responses.bytes.count
(count)
The total size of HTTP responses in bytes handled by a router
Shown as byte
traefik_mesh.service.open_connections
(gauge)
The current count of open connections for a service
traefik_mesh.service.request.duration.seconds.bucket
(count)
Request processing duration histogram for a service
Shown as second
traefik_mesh.service.request.duration.seconds.count
(count)
Request processing duration histogram for a service
Shown as second
traefik_mesh.service.request.duration.seconds.sum
(count)
Request processing duration histogram for a service
Shown as second
traefik_mesh.service.requests.bytes.count
(count)
The total size of HTTP requests in bytes handled by a service
Shown as byte
traefik_mesh.service.requests.count
(count)
The total count of HTTP requests received by a service

Eventos

La integración de Traefik Mesh no incluye ningún evento.

Checks de servicio

traefik_mesh.openmetrics.health
Returns CRITICAL if the Agent is unable to connect to the Traefik Mesh OpenMetrics endpoint, otherwise returns OK.
Statuses: ok, critical

traefik_mesh.controller.ready
Returns OK if the /api/status/readiness for the Mesh Controller returns 200, otherwise returns CRITICAL.
Statuses: ok, critical

Solucionar problemas

¿Necesitas ayuda? Ponte en contacto con el soporte de Datadog.

PREVIEWING: iadjivon/dashboard-small-edit