Esta es una traducción de la página de documentación original en español. Ayúdanos a mejorarla.

#5 Comprobaciones sencillas

Visión general

Las comprobaciones simples se utilizan normalmente para comprobaciones remotas sin agente de servicios.

Tenga en cuenta que el agente Zabbix no es necesario para controles simples. Zabbix servidor/proxy es responsable del procesamiento de cheques simples (haciendo conexiones externas, etc.).

Ejemplos de uso de cheques simples:

net.tcp.service[ftp,,155]
       net.tcp.service[http]
       net.tcp.service.perf[http,,8080]
       net.udp.service.perf[ntp]

Campos Nombre de usuario y Contraseña en elemento de verificación simple la configuración se utiliza para los elementos de supervisión de VMware; ignorado de lo contrario.

Comprobaciones simples admitidas

Lista de comprobaciones simples admitidas:

Ver también:

Clave
Descripción Valor devuelto Parámetros Comentarios
icmpping[<destino>,<paquetes>,<intervalo>,<tamaño>,<tiempo de espera>]
Accesibilidad del host mediante ping de ICMP. 0 - El ping de ICMP falla

1 - El ping de ICMP es exitoso
objetivo - IP del host o nombre DNS
paquetes - número de paquetes<br >intervalo: tiempo entre paquetes sucesivos en milisegundos
tamaño: tamaño del paquete en bytes
tiempo de espera: tiempo de espera en milisegundos
Ejemplo:
=> icmpping[, 4] → si se devuelve al menos un paquete de los cuatro, el ítem devolverá 1.

Ver también: tabla de valores por defecto.
icmppingloss[<destino>,<paquetes>,<intervalo>,<tamaño>,<tiempo de espera>]
Porcentaje de paquetes perdidos. Flotante. destino - IP del host o nombre DNS
paquetes - número de paquetes
intervalo - tiempo entre paquetes sucesivos en milisegundos<br >tamaño: tamaño del paquete en bytes
tiempo de espera: tiempo de espera en milisegundos
Véase también: tabla de valores predeterminados.
icmppingsec[<destino>,<paquetes>,<intervalo>,<tamaño>,<tiempo de espera>,<modo>]
Tiempo de respuesta de ping ICMP (en segundos). Flotante. objetivo: IP del host o nombre DNS
paquetes: número de paquetes
intervalo: tiempo entre paquetes sucesivos en milisegundos
tamaño - tamaño del paquete en bytes
tiempo de espera - tiempo de espera en milisegundos
modo - valores posibles: min, max, avg (predeterminado)
Los paquetes perdidos o agotados no se utilizan en el cálculo.

Si el host no está disponible (se agotó el tiempo de espera), el elemento devolverá 0.
Si el valor devuelto es inferior a 0,0001 segundos, el valor se establecerá en 0,0001 segundos.

Ver también: tabla de valores predeterminados.
net.tcp.service[servicio,<ip>,<puerto>]
Comprueba si el servicio se está ejecutando y acepta conexiones TCP. 0 - el servicio está inactivo

1 - el servicio se está ejecutando
servicio - valores posibles: ssh, ldap, smtp, ftp, http, pop, nntp, imap, tcp, https, telnet (ver detalles)
ip: dirección IP o nombre DNS (de forma predeterminada, se utiliza la IP/DNS del host)
port: número de puerto (de forma predeterminada, se utiliza el número de puerto de servicio estándar).
Ejemplo:
= > net.tcp.service[ftp,,45] → se puede usar para probar la disponibilidad del servidor FTP en el puerto TCP 45.

Tenga en cuenta que con el servicio tcp el puerto es obligatorio.< br>Estas comprobaciones pueden generar mensajes adicionales en los archivos de registro del daemon del sistema (las sesiones SMTP y SSH se registran normalmente).
Actualmente no se admite la comprobación de protocolos cifrados (como IMAP en el puerto 993 o POP en el puerto 995). Como solución alternativa, utilice net.tcp.service[tcp,<ip>,port] para verificaciones como estas.
Los servicios https y telnet son compatibles desde Zabbix 2.0.
net.tcp.service.perf[servicio,<ip>,<puerto>]
Comprueba el rendimiento del servicio TCP. Flotante.

0.000000: el servicio está inactivo

segundos: la cantidad de segundos transcurridos mientras se conecta al servicio
servicio: valores posibles: * ssh, ldap, smtp, ftp, http, pop, nntp, imap, tcp, https, telnet* (ver detalles)
ip: dirección IP o nombre DNS (de forma predeterminada, se utiliza la IP/DNS del host)
port: número de puerto (de forma predeterminada, puerto de servicio estándar se usa el número).
Ejemplo:
=> net.tcp.service.perf[ssh] → se puede usar para probar la velocidad de respuesta inicial del servidor SSH.

Tenga en cuenta que con * El servicio tcp* que indica que el puerto es obligatorio.
Actualmente no se admite la verificación de protocolos cifrados (como IMAP en el puerto 993 o POP en el puerto 995). Como solución alternativa, utilice net.tcp.service.perf[tcp,<ip>,port] para verificaciones como estas.
Los servicios https y telnet son compatibles desde Zabbix 2.0.
Llamado tcp_perf antes de Zabbix 2.0.
net.udp.service[servicio,<ip>,<puerto>]
Comprueba si el servicio se está ejecutando y respondiendo a las solicitudes UDP. 0 - el servicio está inactivo

1 - el servicio se está ejecutando
servicio - valores posibles: ntp (ver detalles)
ip: dirección IP o nombre DNS (de forma predeterminada, se utiliza la IP/DNS del host)
port: número de puerto (de forma predeterminada, el número de puerto de servicio estándar se usa).
Ejemplo:
=> net.udp.service[ntp,,45] → se puede usar para probar la disponibilidad del servicio NTP en el puerto UDP 45.

Este elemento es compatible desde Zabbix 3.0, pero el servicio ntp estaba disponible para el elemento net.tcp.service[] en versiones anteriores.
net.udp.service.perf[servicio,<ip>,<puerto>]
Comprueba el rendimiento del servicio UDP. Flotante.

0.000000: el servicio está inactivo

segundos: la cantidad de segundos que se pasan esperando la respuesta del servicio
servicio: valores posibles: ntp (consulte detalles)
ip: dirección IP o nombre DNS (de forma predeterminada, se utiliza la IP/DNS del host)
puerto - número de puerto (de forma predeterminada, se usa el número de puerto de servicio estándar).
Ejemplo:
=> net.udp.service.perf[ntp] → se puede usar para probar el tiempo de respuesta del servicio NTP.<br >
Este elemento es compatible desde Zabbix 3.0, pero el servicio ntp estaba disponible para el elemento net.tcp.service[] en versiones anteriores.

Item key details

icmpping[<target>,<packets>,<interval>,<size>,<timeout>,<options>]


The host accessibility by ICMP ping.
Return value: 0 - ICMP ping fails; 1 - ICMP ping successful.

Parameters:

  • target - the host IP or DNS name;
  • packets - the number of packets;
  • interval - the time between successive packets in milliseconds;
  • size - the packet size in bytes;
  • timeout - the timeout in milliseconds;
  • options - used for allowing redirect: if empty (default value), redirected responses are treated as target host down; if set to allow_redirect, redirected responses are treated as target host up.

See also the table of default values.

Example:

icmpping[,4] #If at least one packet of the four is returned, the item will return 1.
icmppingloss[<target>,<packets>,<interval>,<size>,<timeout>,<options>]


The percentage of lost packets.
Return value: Float.

Parameters:

  • target - the host IP or DNS name;
  • packets - the number of packets;
  • interval - the time between successive packets in milliseconds;
  • size - the packet size in bytes;
  • timeout - the timeout in milliseconds;
  • options - used for allowing redirect: if empty (default value), redirected responses are treated as target host down; if set to allow_redirect, redirected responses are treated as target host up.

See also the table of default values.

icmppingsec[<target>,<packets>,<interval>,<size>,<timeout>,<mode>,<options>]


The ICMP ping response time (in seconds).
Return value: Float.

Parameters:

  • target - the host IP or DNS name;
  • packets - the number of packets;
  • interval - the time between successive packets in milliseconds;
  • size - the packet size in bytes;
  • timeout - the timeout in milliseconds;
  • mode - possible values: min, max, or avg (default);
  • options - used for allowing redirect: if empty (default value), redirected responses are treated as target host down; if set to allow_redirect, redirected responses are treated as target host up.

Comments:

  • Packets which are lost or timed out are not used in the calculation;
  • If the host is not available (timeout reached), the item will return 0;
  • If the return value is less than 0.0001 seconds, the value will be set to 0.0001 seconds;
  • See also the table of default values.
net.tcp.service[service,<ip>,<port>]


Checks if a service is running and accepting TCP connections.
Return value: 0 - the service is down; 1 - the service is running.

Parameters:

  • service - possible values: ssh, ldap, smtp, ftp, http, pop, nntp, imap, tcp, https, telnet (see details);
  • ip - the IP address or DNS name (by default the host IP/DNS is used);
  • port - the port number (by default the standard service port number is used).

Comments:

  • Note that with tcp service indicating the port is mandatory;
  • These checks may result in additional messages in system daemon logfiles (SMTP and SSH sessions being logged usually);
  • Checking of encrypted protocols (like IMAP on port 993 or POP on port 995) is currently not supported. As a workaround, please use net.tcp.service[tcp,<ip>,port] for checks like these.

Example:

net.tcp.service[ftp,,45] #This item can be used to test the availability of FTP server on TCP port 45.
net.tcp.service.perf[service,<ip>,<port>]


Checks the performance of a TCP service.
Return value: Float: 0.000000 - the service is down; seconds - the number of seconds spent while connecting to the service.

Parameters:

  • service - possible values: ssh, ldap, smtp, ftp, http, pop, nntp, imap, tcp, https, telnet (see details);
  • ip - the IP address or DNS name (by default the host IP/DNS is used);
  • port - the port number (by default the standard service port number is used).

Comments:

  • Note that with tcp service indicating the port is mandatory;
  • Checking of encrypted protocols (like IMAP on port 993 or POP on port 995) is currently not supported. As a workaround, please use net.tcp.service[tcp,<ip>,port] for checks like these.

Example:

net.tcp.service.perf[ssh] #This item can be used to test the speed of initial response from SSH server.
net.udp.service[service,<ip>,<port>]


Checks if a service is running and responding to UDP requests.
Return value: 0 - the service is down; 1 - the service is running.

Parameters:

  • service - possible values: ntp (see details);
  • ip - the IP address or DNS name (by default the host IP/DNS is used);
  • port - the port number (by default the standard service port number is used).

Example:

net.udp.service[ntp,,45] #This item can be used to test the availability of NTP service on UDP port 45.
net.udp.service.perf[service,<ip>,<port>]


Checks the performance of a UDP service.
Return value: Float: 0.000000 - the service is down; seconds - the number of seconds spent waiting for response from the service.

Parameters:

  • service - possible values: ntp (see details);
  • ip - the IP address or DNS name (by default the host IP/DNS is used);
  • port - the port number (by default the standard service port number is used).

Example:

net.udp.service.perf[ntp] #This item can be used to test the response time from NTP service.

Note that for SourceIP support in LDAP simple checks, OpenLDAP version 2.6.1 or above is required.

Procesamiento de tiempo de espera

Zabbix no procesará un cheque simple más de los segundos de tiempo de espera definido en el archivo de configuración del servidor/proxy de Zabbix.

ping ICMP

Zabbix utiliza la utilidad externa fping para el procesamiento de pings ICMP.

La utilidad no es parte de la distribución de Zabbix y debe ser adicionalmente instalado. Si falta la utilidad, tiene permisos incorrectos o su ubicación no coincide con la ubicación establecida en Zabbix archivo de configuración del servidor/proxy (parámetro 'FpingLocation'), pings ICMP (icmpping, icmppingloss, icmppingsec) no se procesarán.

Ver también: conocido problemas

fping debe ser ejecutable por el usuario Los demonios Zabbix se ejecutan como y raíz setuida. Ejecute estos comandos como usuario raíz para configurar permisos correctos:

shell> chown raíz: zabbix /usr/sbin/fping
       shell> chmod 4710 /usr/sbin/fping

Después de realizar los dos comandos anteriores, verifique la propiedad del fping ejecutable. En algunos casos, la propiedad se puede restablecer ejecutando el Comando chmod.

También verifique si el usuario zabbix pertenece al grupo zabbix ejecutando:

shell> grupos zabbix

y si no es agregar emitiendo:

shell> modusuario -a -G zabbix zabbix

Valores predeterminados, límites y descripción de los valores de los parámetros de comprobación de ICMP:

Parámetro Unidad Descripción Indicador de Fping Valores predeterminados establecidos por Límites permitidos
por Zabbix
fping Zabbix min max
paquetes número número de paquetes de solicitud a un objetivo -C 3 1 10000
intervalo milisegundos tiempo de espera entre paquetes sucesivos -p 1000 20 ilimitado
tamaño bytes tamaño del paquete en bytes
56 bytes en x86, 68 bytes en x86_64
-b 56 o 68 24 65507
tiempo de espera milisegundos fping v3.x - tiempo de espera para esperar después del último paquete enviado, afectado por el indicador -C
fping v4.x - tiempo de espera individual para cada paquete
-t fping v3.x - 500
fping v4.x - heredado del indicador -p, pero no más de 2000
50 ilimitado

Además, Zabbix usa opciones de fping -i intervalo ms (no mezcle con el parámetro de elemento intervalo mencionado en la tabla anterior, que corresponde a la opción fping -p) y -S dirección IP de origen (o -I en versiones anteriores de fping). Esas opciones se detectan automáticamente al ejecutar controles con diferentes combinaciones de opciones. Zabbix intenta detectar lo mínimo valor en milisegundos que fping permite usar con -i probando 3 valores: 0, 1 y 10. El valor que primero tiene éxito se usa para comprobaciones posteriores de ICMP. Este proceso lo realiza cada ICMP pinger proceso individualmente.

Las opciones de fping detectadas automáticamente se invalidan cada hora y se detectan de nuevo en el próximo intento de realizar la verificación ICMP. Establezca DebugLevel>=4 en para ver los detalles de este proceso en el archivo de registro del servidor o proxy.

::: nota de advertencia Advertencia: los valores predeterminados de fping pueden diferir dependiendo de plataforma y versión - en caso de duda, consulte fping documentación. :::

Zabbix escribe las direcciones IP para que las verifique cualquiera de los tres icmpping* claves a un archivo temporal, que luego se pasa a fping. Si los artículos tienen diferentes parámetros clave, solo aquellos con parámetros clave idénticos se escriben en un solo archivo.
Todas las direcciones IP escritas en el archivo único se verificarán haciendo fping en paralelo, por lo que el proceso de pinger de Zabbix icmp pasará una cantidad fija de tiempo sin tener en cuenta el número de direcciones IP en el archivo.

Installation

fping is not included with Zabbix and needs to be installed separately:

  • Various Unix-based platforms have the fping package in their default repositories, but it is not pre-installed. In this case you can use the package manager to install fping.

  • Zabbix provides fping packages for RHEL. Please note that these packages are provided without official support.

  • fping can also be compiled from source.

Configuration

Specify fping location in the FpingLocation parameter of Zabbix server/proxy configuration file (or Fping6Location parameter for using IPv6 addresses).

fping should be executable by the user Zabbix server/proxy run as and this user should have sufficient rights.

See also: Known issues for processing simple checks with fping versions below 3.10.

Default values

Defaults, limits and description of values for ICMP check parameters:

Parameter Unit Description Fping's flag Defaults set by Allowed limits
by Zabbix
fping Zabbix min max
packets number number of request packets sent to a target -C 3 1 10000
interval milliseconds time to wait between successive packets to an individual target -p 1000 20 unlimited
size bytes packet size in bytes
56 bytes on x86, 68 bytes on x86_64
-b 56 or 68 24 65507
timeout milliseconds fping v3.x - timeout to wait after last packet sent, affected by -C flag
fping v4.x - individual timeout for each packet
-t fping v3.x - 500
fping v4.x and newer - inherited from -p flag, but not more than 2000
50 unlimited

The defaults may differ slightly depending on the platform and version.

In addition, Zabbix uses fping options -i interval ms (do not mix up with the item parameter interval mentioned in the table above, which corresponds to fping option -p) and -S source IP address (or -I in older fping versions). These options are auto-detected by running checks with different option combinations. Zabbix tries to detect the minimal value in milliseconds that fping allows to use with -i by trying 3 values: 0, 1 and 10. The value that first succeeds is then used for subsequent ICMP checks. This process is done by each ICMP pinger process individually.

Auto-detected fping options are invalidated every hour and detected again on the next attempt to perform ICMP check. Set DebugLevel>=4 in order to view details of this process in the server or proxy log file.

Zabbix writes IP addresses to be checked by any of the three icmpping* keys to a temporary file, which is then passed to fping. If items have different key parameters, only the ones with identical key parameters are written to a single file. All IP addresses written to the single file will be checked by fping in parallel, so Zabbix ICMP pinger process will spend fixed amount of time disregarding the number of IP addresses in the file.