This is a translation of the original English documentation page. Help us make it better.

5 シンプルチェック

概要

シンプルチェックは、通常、リモートエージェントを使用しないサービスをチェックするために使用します。

なお、シンプルチェックではZabbix agent は必要ありません。
Zabbix server / proxy はシンプルチェックの処理(外部接続の確立など)を担当します。

シンプルチェックの利用例

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

シンプルチェック項目のUser nameおよびPasswordフィールドはVMwareの監視項目に使用され、それ以外は無視されます。

サポートされているシンプルチェック

サポートするシンプルチェックの一覧です:

こちらも参照のこと:

Key
説明 戻り値 パラメータ コメント
icmpping[<target>,<packets>,<interval>,<size>,<timeout>]
ICMP ping によるホスト アクセス 0 - ICMP ping 失敗

1 - ICMP ping 成功
target - ホストIPまたは DNS 名
packets - パケット数
interval - 連続するパケット間の時間 (ミリ秒単位)
size - パケットサイズ (バイト単位)
timeout - タイムアウト (ミリ秒単位)
例:
=> icmpping[,4] → 4 つのパケットのうち少なくとも 1 つのパケットが返された場合、アイテムは 1 を返します。

参照: デフォルト値の表
icmppingloss[<target>,<packets>,<interval>,<size>,<timeout>]
パケットロスの割合 浮動小数点 target - ホスト IP または DNS 名
packets - パケット数
interval - 連続するパケット間の時間 (ミリ秒単位)
size - パケットサイズ (バイト単位)
timeout - タイムアウト (ミリ秒単位)
参照: デフォルト値の表
icmppingsec[<target>,<packets>,<interval>,<size>,<timeout>,<mode>]
ICMP ping 応答時間 (秒単位) 浮動小数点 target - ホスト IP または DNS 名
packets - パケット数
interval - 連続するパケット間の時間 (ミリ秒単位)
size - パケットサイズ (バイト単位)
timeout - タイムアウト (ミリ秒単位)
mode - 使用可能な値: min, max, avg (デフォルト)
パケットロスやタイムアウトパケットは計算に使用されません。

ホストが使用できない (タイムアウトに達した) 場合、アイテムは 0 を返します。
戻り値が 0.0001 秒未満の場合、 値は 0.0001 秒に設定されます。

参照: デフォルト値の表
net.tcp.service[service,<ip>,<port>]
サービスが実行中であり、TCP 接続を受け入れているかどうかを確認します。 0 - サービス停止

1 - サービス実行中
service - 使用可能な値: ssh, ldap, smtp, ftp, http, pop, nntp, imap, tcp, https, telnet (参照:詳細)
ip - IP アドレスまたは DNS 名 (デフォルトではホスト IP/DNS が使用されます)
port - ポート番号(デフォルトでは、標準のサービス ポート番号が使用されます)
例:
=> net.tcp.service[ftp,,45] → TCP ポート 45 で FTP サーバーの可用性をテストします

ポートを示す tcp サービスは必須であることに注意してください。
これらのチェックにより、システム デーモンのログファイルに追加のメッセージが記録される場合があります (SMTP および SSH セッションは通常ログに記録されます)。
暗号化されたプロトコル (ポート 993 の IMAP やポート 995 の POP など) のチェックは現在サポートされていません。 回避策として、このようなチェックには net.tcp.service[tcp,<ip>,port] を使用してください。
https および telnet サービスは、Zabbix 2.0 以降でサポートされています。
net.tcp.service.perf[service,<ip>,<port>]
TCP サービスのパフォーマンスをチェックします 浮動小数点

0.000000 - サービス停止

秒 - サービスへの接続にかかった秒数
service - 使用可能な値: ssh, ldap, smtp, ftp, http, pop, nntp, imap, tcp, https, telnet (参照:詳細)
ip - IP アドレスまたは DNS 名 (デフォルトではホスト IP/DNS が使用されます)
port - ポート番号(デフォルトでは、標準のサービス ポート番号が使用されます)
例:
=> net.tcp.service.perf[ssh] → SSH サーバーの初期応答速度をテストします。

ポートを示す tcp サービスが必須であることに注意してください。
暗号化されたプロトコルのチェック (ポート 993 の IMAP またはポートの POP など) 995) は現在サポートされていません。 回避策として、これらのチェックには net.tcp.service.perf[tcp,<ip>,port] を使用してください。
https および telnet サービスは、Zabbix 2.0 以降でサポートされています。
Zabbix 2.0より前はtcp_perfと呼ばれていました。
net.udp.service[service,<ip>,<port>]
サービスが実行中であり、UDP 要求に応答しているかどうかを確認します。 0 - サービス停止

1 - サービス実行中
service - 使用可能な値: ntp (参照:詳細)
ip - IP アドレスまたは DNS 名 (デフォルトではホスト IP/DNS が使用されます)
port - ポート番号(デフォルトでは、標準のサービス ポート番号が使用されます)
例:
=> net.udp.service[ntp,,45] → UDP ポート 45 で NTP サービスの可用性をテストします。

このアイテムは Zabbix 3.0 以降でサポートされていますが、ntp サービスは以前のバージョンでは net.tcp.service[] アイテムで利用可能でした。
net.udp.service.perf[service,<ip>,<port>]
UDP サービスのパフォーマンスをチェックします。 浮動小数点

0.000000 - サービス停止

秒 - サービスからの応答の待機にかかった秒数
service - 使用可能な値: ntp (参照詳細)
ip - IP アドレスまたは DNS 名 (デフォルトではホスト IP/DNS が使用されます)
port - ポート番号(デフォルトでは、標準のサービス ポート番号が使用されます)
例:
=> net.udp.service.perf[ntp] → NTP サービスからの応答時間をテストします。

このアイテムは Zabbix 3.0 以降でサポートされていますが、ntp サービスは以前のバージョンでは net.tcp.service[] アイテムで利用可能でした。

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.

タイムアウト処理

Zabbixは、Zabbix server / proxy 設定ファイルに定義されたタイムアウト秒数以上のシンプルチェックは処理しません。

ICMP ping

ZabbixはICMP pingの処理に外部ユーティリティfpingを使用しています。

このユーティリティはZabbixの配布物には含まれていないため、追加でインストールする必要があります。
ユーティリティがない場合、パーミッションが正しくない場合、またはユーティリティの場所が
Zabbix server / proxy 設定ファイル('FpingLocation'パラメータ)で設定した場所と一致しない場合、 ICMP Ping(icmpping, icmppingloss, icmppingsec) は処理されません。

known issues もあわせて参照してください。

fpingは、Zabbix daemon が実行されるユーザで実行可能である必要があります。setuid root で実行する必要があります。
正しいパーミッションを設定するために、ユーザrootとして以下のコマンドを実行してください。

shell> chown root:zabbix /usr/sbin/fping
       shell> chmod 4710 /usr/sbin/fping

上記 2 つのコマンドを実行した後、fping 実行ファイルの所有権を確認します。 場合によっては、chmod コマンドを実行することで、所有権をリセットできる場合があります。

また、ユーザ zabbix がグループ zabbix に属しているかどうかも確認してください。

shell> groups zabbix

zabbix グループに追加されていない場合は、以下を実行してください。

shell> usermod -a -G zabbix zabbix

ICMPチェックパラメータのデフォルト値、制限値の説明:

パラメータ 単位 説明 Fpingのflag デフォルト値 制限値
by Zabbix
fping Zabbix min max
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
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 - inherited from -p flag, but not more than 2000
50 unlimited

さらに、Zabbix は fping オプションとして、-i interval ms (上表の item パラメータ interval
混同しないように注意してください) と-S source IP address(旧fpingバージョンでは-I)を使用します。
これらのオプションは、異なるオプションの組み合わせでチェックを実行することで、自動的に検出されます。
Zabbixは、fping が -i で使用できる最小値をミリ秒単位で検出するため、0、1、10の3つの値を試します。
最初に成功した値がその後のICMPチェックに使われます。この処理は、各ICMP pinger プロセスが個別に行います。

自動検出された fping オプションは、1時間ごとに無効化され、次回のICMP検査時に再度検出されます。
このプロセスの詳細を表示するには、DebugLevel>=4 に設定します。
server または proxy のログファイルにこのプロセスの詳細が表示されます。

警告: fping のデフォルトは、プラットフォームとバージョンによって異なる場合があります。
fping のドキュメントを確認してください。

Zabbixは、3つのicmppingキーでチェックするIPアドレスを一時ファイルに書き込み、
このファイルをfpingに渡します。item キーパラメータが異なる項目は、キーパラメータが同一のもの
のみ1つのファイルに書き込まれます。
1つのファイルに書き込まれた全てのIPアドレスを並列にfpingでチェックするため、Zabbixのicmpピンガープロセスは
ファイル内のIPアドレスの数に関係なく、一定の時間を費やします。

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.