Zabbix Documentation 2.0

3.04.04.24.4 (current)| In development:5.0 (devel)| Unsupported:1.82.02.22.43.23.4Guidelines

User Tools

Site Tools


manual:config:items:itemtypes:simple_checks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
manual:config:items:itemtypes:simple_checks [2014/09/25 14:41]
sasha Page moved from 2.0:manual:config:items:itemtypes:simple_checks to manual:config:items:itemtypes:simple_checks
manual:config:items:itemtypes:simple_checks [2017/02/22 13:25] (current)
viktors.tjarve [5.3 ICMP pings] style improvement for fping table - timeout with fping v4.0+
Line 5: Line 5:
 Simple checks are normally used for remote agent-less checks of services. ​ 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).+Note that Zabbix agent is not needed for simple checks. Zabbix server/​proxy ​is responsible for the processing of simple checks (making external connections,​ etc).
  
 Examples of using simple checks: ​ Examples of using simple checks: ​
Line 20: Line 20:
 | ||||| | |||||
 ^icmpping[<​target>,<​packets>,<​interval>,<​size>,<​timeout>​] ​ ^^^^^ ^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 ​[[:​2.0/​manual/​config/​items/​itemtypes/​simple_checks#​icmp_pings|ICMP pings]].  |+^ |Host accessibility ​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: table of [[simple_checks#​icmp_pings|default values]].|
 | ||||| | |||||
 ^icmppingloss[<​target>,<​packets>,<​interval>,<​size>,<​timeout>​] ​ ^^^^^ ^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 ​[[:​2.0/​manual/​config/​items/​itemtypes/​simple_checks#​icmp_pings|ICMP pings]].  |+^ |Percentage ​of lost packets. ​ |Float. ​ ​|**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: table of [[simple_checks#​icmp_pings|default values]].|
 | ||||| | |||||
 ^icmppingsec[<​target>,<​packets>,<​interval>,<​size>,<​timeout>,<​mode>​] ​ ^^^^^ ^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.  |+^ |ICMP ping response time (in seconds).  |Float. ​ ​|**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.\\ \\ See also: table of [[simple_checks#​icmp_pings|default values]].|
 | ||||| | |||||
 ^net.tcp.service[service,<​ip>,<​port>​] ​ ^^^^^ ^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.|+^ |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 ​(see [[:​manual/​appendix/​items/​service_check_details|details]])\\ **ip** - IP address ​or DNS name (by default, ​host IP/DNS is used)\\ **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.\\ Services **https** and **telnet** supported since Zabbix 2.0.\\ Service **ntp** only works since Zabbix 2.0.15, despite being available in earlier versions.|
 | ||||| | |||||
 ^net.tcp.service.perf[service,<​ip>,<​port>​] ​ ^^^^^ ^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.|+^ |Service ​performance ​check.  |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 ​(see [[:​manual/​appendix/​items/​service_check_details|details]])\\ **ip** - IP address ​or DNS name (by default, ​host IP/DNS is used)\\ **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.\\ Services **https** and **telnet** supported since Zabbix 2.0.\\ Service **ntp** only works since Zabbix 2.0.15, despite being available in earlier versions.\\ ​Called tcp_perf before Zabbix 2.0.|
  
 == Timeout processing == == Timeout processing ==
  
-Zabbix will not process a simple check longer than the Timeout seconds defined in the Zabbix server configuration file.+Zabbix will not process a simple check longer than the Timeout seconds defined in the Zabbix server/​proxy ​configuration file.
 === - ICMP pings === === - ICMP pings ===
  
 Zabbix uses external utility **fping** for processing of 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.+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/​proxy ​configuration file ('​FpingLocation'​ parameter), ICMP pings (**icmpping**,​ **icmppingloss**,​ **icmppingsec**) will not be processed. 
 + 
 +See also: [[manual:​installation:​known_issues#​simple_checks|known issues]]
  
 **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:​ **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:​
Line 47: Line 49:
   shell> chown root:zabbix /​usr/​sbin/​fping   shell> chown root:zabbix /​usr/​sbin/​fping
   shell> chmod 4710 /​usr/​sbin/​fping   shell> chmod 4710 /​usr/​sbin/​fping
 +
 +After performing the two commands above check ownership of the **fping** executable. In some cases the ownership can be reset by executing the chmod command.
  
 Defaults, limits and description of values for ICMP check parameters: Defaults, limits and description of values for ICMP check parameters:
  
-^  Parameter ​ ^  Unit  ^  Description ​ ^  Fping'​s flag  ^  Defaults set by  ^^  Allowed limits\\ by zabbix server ​ ^^ +^  Parameter ​ ^  Unit  ^  Description ​ ^  Fping'​s flag  ^  Defaults set by  ^^  Allowed limits\\ by Zabbix ​ ^^ 
-^:::          ^:::     ​^::: ​           ^:::           ​^ ​ fping  ^  ​server ​ ​^ ​ min  ^  max  ^+^:::          ^:::     ​^::: ​           ^:::           ​^ ​ fping  ^  ​Zabbix ​ ​^ ​ min  ^  max  ^
 |packets ​  ​|number ​ |number of request packets to a target ​   |-C  |  |3  |1   ​|10000 ​     | |packets ​  ​|number ​ |number of request packets to a target ​   |-C  |  |3  |1   ​|10000 ​     |
 |interval ​ |milliseconds ​ |time to wait between successive packets ​ |-p  |1000  |  |20  |unlimited ​ | |interval ​ |milliseconds ​ |time to wait between successive packets ​ |-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 ​     | |size      |bytes ​        ​|packet size in bytes\\ 56 bytes on x86, 68 bytes on x86_64 ​ |-b  |56 or 68  |  |24  |65507 ​     |
-|timeout ​  ​|milliseconds ​ |timeout to wait after last packet sent (affected by "-C" ​flag)  |-t |500  |  |50  |unlimited ​ |+|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** - inherited from //-p// flag, but not more than 2000  ​| ​ |50  |unlimited ​ |
  
 <note warning>​Warning:​ fping defaults can differ depending on platform and version - if in doubt, check fping documentation.</​note>​ <note warning>​Warning:​ fping defaults can differ depending on platform and version - if in doubt, check fping documentation.</​note>​
  
-Zabbix writes addresses to be checked by any of three //​icmpping*//​ keys to a temporary file, which is then passed to **fping**. If items have different key parameters, only ones with identical key parameters are written to a single file.\\ All addresses written to the single file will be checked by fping in parallel ​mode, so Zabbix icmp pinger process will spend fixed amount of time disregarding ​count of addresses in the file.+Zabbix writes ​IP addresses to be checked by any of three //​icmpping*//​ keys to a temporary file, which is then passed to **fping**. If items have different key parameters, only 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.