5 Simple checks
5.1 Overview
Simple checks are normally used for remote agent-less checks of services.
Note that Zabbix agent is not needed for simple checks. Zabbix server is responsible for the processing of simple checks (making external connections, etc).
Examples of using simple checks:
net.tcp.service[ftp,,155] net.tcp.service[http] net.tcp.service.perf[http,,8080]
5.2 Supported simple checks
List of supported simple checks:
See also:
| Key | ||||
|---|---|---|---|---|
| Description | Return value | Parameters | Comments | |
| icmpping[<target>,<packets>,<interval>,<size>,<timeout>] | ||||
| Checks if server is accessible by ICMP ping. | 0 – ICMP ping fails 1 – ICMP ping successful |
target – host IP or DNS name packets – number of packets interval – time between successive packets in milliseconds size – packet size in bytes timeout – timeout in milliseconds |
Example: icmpping[,4] – if at least one packet of the four is returned, the item will return 1.
See also details of processing ICMP pings. |
|
| icmppingloss[<target>,<packets>,<interval>,<size>,<timeout>] | ||||
| Returns percentage of lost packets. | Loss of packets in percent | target – host IP or DNS name packets – number of packets interval – time between successive packets in milliseconds size – packet size in bytes timeout – timeout in milliseconds |
See also details of processing ICMP pings. | |
| icmppingsec[<target>,<packets>,<interval>,<size>,<timeout>,<mode>] | ||||
| Returns ICMP ping response time. | Number of seconds | target – host IP or DNS name packets – number of packets interval – time between successive packets in milliseconds size – packet size in bytes timeout – timeout in milliseconds mode – one of min, max, avg (default) |
If host is not available (timeout reached), the item will return 0. | |
| net.tcp.service[service,<ip>,<port>] | ||||
| Check if service is running and accepting TCP connections. | 0 – service is down 1 – service is running |
service – one of ssh, ntp, ldap, smtp, ftp, http, pop, nntp, imap, tcp, https, telnet ip – IP address of the Zabbix host definition port – port number (by default standard service port number is used). |
Example: net.tcp.service[ftp,,45] can be used to test the availability of FTP server on TCP port 45. Note that with tcp service indicating the port is mandatory. Note that 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. Note that telnet check looks for a prompt (':' at the end). Services https and telnet supported since Zabbix 2.0. |
|
| net.tcp.service.perf[service,<ip>,<port>] | ||||
| Check performance of service. | 0 – service is down sec – number of seconds spent while connecting to the service |
service – one of ssh, ntp, ldap, smtp, ftp, http, pop, nntp, imap, tcp, https, telnet ip – IP address of the Zabbix host definition port – port number (by default standard service port number is used). |
Example: net.tcp.service.perf[ssh] can be used to test the speed of initial response from SSH server. 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.perf[tcp,<ip>,port] for checks like these. Note that telnet check looks for a prompt (':' at the end). Services https and telnet supported since Zabbix 2.0. Called tcp_perf before Zabbix 2.0. |
|
Timeout processing
Zabbix will not process a simple check longer than the Timeout seconds defined in the Zabbix server configuration file.
5.3 ICMP pings
Zabbix uses external utility fping for processing of ICMP pings.
The utility is not part of Zabbix distribution and has to be additionally installed. If the utility is missing, has wrong permissions or its location does not match the location set in the Zabbix server configuration file ('FpingLocation' parameter), ICMP pings (icmpping, icmppingloss, icmppingsec) will not be processed.
fping must be executable by the user Zabbix daemons run as and setuid root. Run these commands as user root in order to set up correct permissions:
shell> chown root:zabbix /usr/sbin/fping shell> chmod 4710 /usr/sbin/fping
The default values for ICMP check parameters:
| Parameter | Value | Description | fping flag | Min | Max |
|---|---|---|---|---|---|
| packets | 3 | pings to the target | -C | 1 | 10000 |
| interval | 1000 | milliseconds, “fping” default | -p | 20 | |
| size | 56 or 68 | bytes, “fping” default; 56 bytes on x86, 68 bytes on x86_64 | -b | 24 | 65507 |
| timeout | 500 | milliseconds, “fping” default | -t | 50 |
Zabbix writes addresses to be checked to a temporary file, which is then passed to fping. If items have different parameters, only ones with identical parameters are written to a single file.
Because multiple ICMP ping checks can be done with a single fping invocation the ICMP checks for items with the same interface are scheduled at the same time, reducing the number of required fping invocations.
Data source: Zabbix