Supported OS

Versión de la integración1.1.1

Información general

Conéctate a Zabbix para:

  • Monitorizar Zabbix a través de Datadog Agent.
  • Enviar alertas de Zabbix a Datadog para ver las alertas como eventos en tu flujo (stream) de eventos Datadog.

Configuración

El check de Zabbix no está incluido en el paquete del Datadog Agent, por lo que es necesario instalarlo.

Instalación

Para el Agent v7.21/v6.21 o posteriores, sigue las instrucciones a continuación para instalar el check de Zabbix en tu host. Para instalarlo con el Agent Docker o versiones anteriores del Agent, consulta Uso de integraciones de la comunidad.

  1. Ejecuta el siguiente comando para instalar la integración del Agent:

    datadog-agent integration install -t datadog-zabbix==<INTEGRATION_VERSION>
    
  2. Configura tu integración como si fuese una integración de base.

Configuración

  1. Asegúrate de que la zona horaria de tu servidor Zabbix esté configurada en UTC. Puedes encontrar más información sobre las zonas horarias de Zabbix en la documentación de Zabbix.

  2. Edita el archivo zabbix.d/conf.yaml, que se encuentra en la carpeta conf.d/ en la raíz del directorio de configuración de tu Agent, para empezar a recopilar los datos de rendimiento de Zabbix. Consulta el zabbix.d/conf.yaml de ejemplo para conocer todas las opciones de configuración disponibles.

  3. Reinicia el Agent.

Recopilación de eventos

Crear un tipo de soporte Datadog
  1. Ve a Administration > Media Types > Create Media Type (Administración > Tipos de soporte > Crear un tipo de soporte).
  2. Añade parámetros al webhook utilizando variables de plantilla Zabbix. Añade tu api_key Datadog y las siguientes variables de plantilla Zabbix como parámetros:
ParámetroValor
api_keyYour Datadog API key
event_date{EVENT.DATE}
event_name{EVENT.NAME}
event_nseverity{EVENT.NSEVERITY}
event_tags{EVENT.TAGSJSON}
event_time{EVENT.TIME}
event_value{EVENT.VALUE}
item_name{ITEM.NAME}
alert_message{ALERT.MESSAGE}
alert_subject{ALERT.SUBJECT}
  1. Define el Nombre como Datadog, el Tipo como Webhook e introduce el siguiente código como Script:
try {
    Zabbix.Log(4, '[datadog webhook] received value=' + value);

    var params = JSON.parse(value);
    var req = new HttpRequest();
    req.addHeader('Content-Type: application/json');
    var webhook_url = 'https://app.datadoghq.com/intake/webhook/zabbix?api_key=' + params.api_key;
    var webhook_data = value;
    var resp = req.post(webhook_url, webhook_data);
    if (req.getStatus() != 202) {
        throw 'Response code: '+req.getStatus();
    }
    Zabbix.Log(4, '[datadog webhook] received response with status code ' + req.getStatus() + '\n' + resp);
} catch (error) {
    Zabbix.Log(4, '[datadog webhook] event creation failed json : ' + webhook_data)
    Zabbix.Log(4, '[datadog webhook] event creation failed : ' + error);
}
return JSON.stringify({});
  1. Confirma que el webhook está configurado correctamente utilizando el botón “Test”.
Asignar soportes webhook a un usuario existente
  1. Después de configurar el tipo de soporte webhook, ve a Administration > Users (Administración > Usuarios) y crea un usuario Zabbix exclusivo para representar el webhook. Por ejemplo, utiliza el alias Datadog para el webhook Datadog. Todos los parámetros, excepto los soportes, se pueden dejar en sus valores predeterminados, ya que este usuario no inicia sesión en Zabbix.
  2. En el perfil de usuario, ve a la pestaña Soporte y añade un webhook con la información de contacto requerida. Si el webhook no utiliza un campo de destino de envíos, introduce cualquier combinación de caracteres admitidos para omitir los requisitos de validación.
  3. Conceda a este usuario al menos permisos de lectura en todos los hosts a los que deba enviar alertas.
Configurar una acción de alerta para el webhook
  1. Ve a Configuration > Actions (Configuración > Acciones).
  2. En el menú desplegable del título de la página, selecciona el tipo de acción preferida.
  3. Haz clic en Create Action (Crear acción).
  4. Pon un nombre a la acción.
  5. Elige las condiciones en las que se realizan las operaciones.
  6. Elige las operaciones que se van a realizar.

Validación

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

Datos recopilados

Métricas

zabbix.processed.floats_per_sec
(gauge)
Number of processed numeric (float) values per second
Shown as unit
zabbix.processed.per_sec
(gauge)
Number of processed values per second
Shown as unit
zabbix.processed.characters_per_sec
(gauge)
Number of processed character values per second
Shown as unit
zabbix.processed.logs_per_sec
(gauge)
Number of processed log values per second
Shown as unit
zabbix.processed.unsigned_per_sec
(gauge)
Number of processed numeric (unsigned) values per second
Shown as unit
zabbix.processed.text_per_sec
(gauge)
Number of processed text values per second
Shown as unit
zabbix.processed.unsupported_per_sec
(gauge)
Number of processed not supported values per second
Shown as unit
zabbix.process.internal.alerter
(gauge)
Utilization of alerter internal processes, in %
Shown as percent
zabbix.process.internal.config_sync
(gauge)
Utilization of configuration syncer internal processes, in %
Shown as percent
zabbix.process.internal.escalator
(gauge)
Utilization of escalator internal processes, in %
Shown as percent
zabbix.process.internal.history_sync
(gauge)
Utilization of history syncer internal processes, in %
Shown as percent
zabbix.process.internal.housekeeper
(gauge)
Utilization of housekeeper internal processes, in %
Shown as percent
zabbix.process.data_collector.discoverer
(gauge)
Utilization of discoverer data collector processes, in %
Shown as percent
zabbix.process.data_collector.http_poller
(gauge)
Utilization of http poller data collector processes, in %
Shown as percent
zabbix.process.data_collector.icmp_pinger
(gauge)
Utilization of icmp pinger data collector processes, in %
Shown as percent
zabbix.process.data_collector.ipmi_poller
(gauge)
Utilization of ipmi poller data collector processes, in %
Shown as percent
zabbix.process.data_collector.java_poller
(gauge)
Utilization of java poller data collector processes, in %
Shown as percent
zabbix.process.data_collector.poller
(gauge)
Utilization of poller data collector processes, in %
Shown as percent
zabbix.process.data_collector.proxy_poller
(gauge)
Utilization of proxy poller data collector processes, in %
Shown as percent
zabbix.process.internal.self_monitoring
(gauge)
Utilization of self-monitoring internal processes, in %
Shown as percent
zabbix.process.data_collector.snmp_trapper
(gauge)
Utilization of snmp trapper data collector processes, in %
Shown as percent
zabbix.process.internal.timer
(gauge)
Utilization of timer internal processes, in %
Shown as percent
zabbix.process.data_collector.trapper
(gauge)
Utilization of trapper data collector processes, in %
Shown as percent
zabbix.process.data_collector.unreachable_poller
(gauge)
Utilization of unreachable poller data collector processes, in %
Shown as percent
zabbix.queue.duration_10
(gauge)
Zabbix queue over 10 minutes
Shown as unit
zabbix.queue.size
(gauge)
Zabbix queue
Shown as unit
zabbix.cache.config
(gauge)
Zabbix configuration cache, % used
Shown as percent
zabbix.cache.write
(gauge)
Zabbix history write cache, % used
Shown as percent
zabbix.cache.index
(gauge)
Zabbix history index cache, % used
Shown as percent
zabbix.cache.write_trend
(gauge)
Zabbix trend write cache, % used
Shown as percent
zabbix.agent.ping
(gauge)
Zabbix agent ping
Shown as unit
zabbix.process.data_collector.vmware
(gauge)
Utilization of vmware data collector processes, in %
Shown as percent
zabbix.cache.value
(gauge)
Zabbix value cache, % used
Shown as percent
zabbix.cache.value.hits
(gauge)
Zabbix value cache hits
Shown as hit
zabbix.cache.value.misses
(gauge)
Zabbix value cache misses
Shown as miss
zabbix.cache.vmware
(gauge)
Zabbix vmware cache, % used
Shown as percent
zabbix.cache.operating_mode
(gauge)
Zabbix value cache operating mode
Shown as unit
zabbix.process.internal.task_manager
(gauge)
Utilization of task manager internal processes, in %
Shown as percent
zabbix.process.internal.ipmi_manager
(gauge)
Utilization of ipmi manager internal processes, in %
Shown as percent
zabbix.process.internal.alert_manager
(gauge)
Utilization of alert manager internal processes, in %
Shown as percent
zabbix.process.internal.preprocessing_manager
(gauge)
Utilization of preprocessing manager internal processes, in %
Shown as percent
zabbix.process.internal.preprocessing_worker
(gauge)
Utilization of preprocessing worker internal processes, in %
Shown as percent
zabbix.queue.preprocessing
(gauge)
Zabbix preprocessing queue
Shown as unit
zabbix.queue.lld
(gauge)
Zabbix LLD queue
Shown as unit
zabbix.process.internal.lld_manager
(gauge)
Utilization of LLD manager internal processes, in %
Shown as unit
zabbix.process.internal.lld_worker
(gauge)
Utilization of LLD worker internal processes, in %
Shown as percent
zabbix.cpu.count
(gauge)
Number of CPUs
Shown as unit
zabbix.cpu.iowait_time
(gauge)
CPU iowait time
zabbix.context_switches_per_sec
(gauge)
Context switches per second
zabbix.cpu.guest_nice_time
(gauge)
CPU guest nice time
zabbix.cpu.guest_time
(gauge)
CPU guest time
zabbix.cpu.softirq_time
(gauge)
CPU softirq time
zabbix.cpu.interrupt_time
(gauge)
CPU interrupt time
zabbix.cpu.steal_time
(gauge)
CPU steal time
zabbix.cpu.nice_time
(gauge)
CPU nice time
zabbix.load.avg.1_min
(gauge)
Load average (1m avg)
zabbix.cpu.user_time
(gauge)
CPU user time
zabbix.cpu.system_time
(gauge)
CPU system time
zabbix.cpu.idle_time
(gauge)
CPU idle time
zabbix.load.avg.15_min
(gauge)
Load average (15m avg)
zabbix.load.avg.5_min
(gauge)
Load average (5m avg)
zabbix.interrupts_per_sec
(gauge)
Interrupts per second
zabbix.memory.avail_percent
(gauge)
Available memory in %
zabbix.memory.total
(gauge)
Total memory
zabbix.memory.avail
(gauge)
Available memory
zabbix.swap_space.total
(gauge)
Total swap space
zabbix.swap_space.free
(gauge)
Free swap space
zabbix.swap_space.free_percent
(gauge)
Free swap space in %
zabbix.system.uptime
(gauge)
System uptime
zabbix.system.boot_time
(gauge)
System boot time
zabbix.system.local_time
(gauge)
System local time
zabbix.user.logged_in
(gauge)
Number of logged in users
zabbix.open_fd.max
(gauge)
Maximum number of open file descriptors
zabbix.processes_max
(gauge)
Maximum number of processes
zabbix.processes_count
(gauge)
Number of processes
zabbix.processes_running_count
(gauge)
Number of running processes
zabbix.cpu.used
(gauge)
CPU utilization
zabbix.agent.avail
(gauge)
Zabbix agent availability
zabbix.process.internal.alert_sync
(gauge)
Utilization of alert syncer internal processes, in %
Shown as percent
zabbix.memory.used
(gauge)
Memory utilization

Eventos

Las alertas de Zabbix se recopilan como eventos en el flujo de eventos Datadog.

Checks de servicios

zabbix.can_connect
Returns CRITICAL if the Agent can’t connect to the Zabbix API, OK otherwise
Statuses: ok, critical

Solucionar problemas

¿Necesitas ayuda? Contacta con el equipo de asistencia de Datadog.