プラグインは、Zabbixの監視機能を拡張するためのオプションです。プラグインはGoプログラミング言語で記述され、
Zabbix agent 2のみでサポートされています。
プラグインはloadable modules (C言語で記述)に代わるもので、Zabbix機能を拡張するその他の方法として、
user parameters(agent メトリクス)、external checks(agent レス監視)や
system. run[]
Zabbix agent item があります。
以下の機能は、agent 2およびそのプラグインに固有のものです:
Zabbix6.0.0以降、プラグインは agent 2に直接組み込む必要はなく、別の外部アドオン(ローダブルプラグイン)として
追加できるため、新しい監視指標を収集するための追加プラグインの作成作業が容易になりました。
このページでは、Zabbixネイティブプラグインの一覧と、ユーザの視点からのプラグイン設定の原則を説明します。
独自のプラグインを作成する方法については、Plugin development guidelinesを参照してください。
このセクションでは、一般的なプラグイン設定の原則とベストプラクティスについて説明します。
すべてのプラグインは Plugins.* パラメータを使用して設定します。このパラメータは、Zabbix agent 2の[configuration file](/manual/appendix/config/zabbix_agent2)の一部、
またはプラグイン自身の[configuration file](/manual/appendix/config/zabbix_agent2_plugins)のいずれかに設定することが
できます。プラグインが別の設定ファイルを使用する場合、Zabbix agent 2設定ファイルのIncludeパラメータにこのファイルへの
パスを指定する必要があります。
各プラグインのパラメータは、以下のような構造になっている必要があります:
Plugins.<PluginName>.<Parameter>=<Value>
パラメータ名は、以下の要件を満たす必要があります:
名前付きセッションは、プラグインパラメータの追加レベルを表し、監視対象の各インスタンスに対して個別の認証パラメータ
セットを定義するために使用することができます。各名前付きセッションのパラメータは、以下のような構造になっている
必要があります:
Plugins.<PluginName>.<SessionName>.<Parameter>=<Value>
URI、ユーザー名、パスワードを別々に指定する代わりに、セッション名を connString の item キーパラメーターとして
使用することができます。item キーでは、最初のパラメータは connString または Uri のいずれかにすることができます。
最初のキーパラメータが設定ファイルで指定されたセッション名と一致する場合、名前付きセッションパラメータを使用して
チェックが実行されます。最初のキーパラメータがどのセッション名にも一致しない場合、それはUri として扱われます。
ただし、:
使用可能な名前付きセッションパラメータのリストはプラグインによって異なります。詳細は
各プラグインの configuration files を参照してください。
例: 2つのインスタンス "MySQL1" と "MySQL2" の監視は、以下のように設定することができます。:
Plugins.Mysql.Sessions.MySQL1.Uri=tcp://127.0.0.1:3306
Plugins.Mysql.Sessions.MySQL1.User=<UsernameForMySQL1>
Plugins.Mysql.Sessions.MySQL1.Password=<PasswordForMySQL1>
Plugins.Mysql.Sessions.MySQL2.Uri=tcp://127.0.0.1:3307
Plugins.Mysql.Sessions.MySQL2.User=<UsernameForMySQL2>
Plugins.Mysql.Sessions.MySQL2.Password=<PasswordForMySQL2>
これらの名前は、URIの代わりにキーの connString として使用することができます:
認証に必要なパラメータが item キーや名前付きセッションパラメータで提供されない場合、プラグインはハードコードされた
デフォルト値を使用します。
プラグインによっては、複数のインスタンスから同時にメトリクスを収集することをサポートしています。
ローカルとリモートの両方のインスタンスを監視することができます。TCP および Unix ソケット接続がサポートされています。
インスタンスへの接続をオープン状態に保つようにプラグインを設定することをお勧めします。その利点は、ネットワークの輻輳、
レイテンシー、およびCPUとメモリの使用量を削減できることです。クライアントライブラリは、この処理を行います。
未使用の接続をオープンにしておく時間は、Plugins.<PluginName>.KeepAliveパラメータで決定されます。 例: Plugins.Memcached.KeepAlive
Zabbix agent 2がサポートする全てのメトリクスはプラグインによって収集されます。
Zabbix agent 2用の以下のプラグインがすぐに利用可能です
:
プラグイン名 | 説明 | サポートするitem keys | コメント |
---|---|---|---|
Agent | Metrics of the Zabbix agent being used. | agent.hostname, agent.ping, agent.version | Supported keys have the same parameters as Zabbix agent keys. |
Ceph | Ceph monitoring. | ceph.df.details, ceph.osd.stats, ceph.osd.discovery, ceph.osd.dump, ceph.ping, ceph.pool.discovery, ceph.status |
Supported keys can be used with Zabbix agent 2 only. See also: - Plugin documentation - Configuration parameters |
CPU | System CPU monitoring (number of CPUs/CPU cores, discovered CPUs, utilization percentage). | system.cpu.discovery, system.cpu.num, system.cpu.util | Supported keys have the same parameters as Zabbix agent keys. |
Docker | Monitoring of Docker containers. | docker.container_info, docker.container_stats, docker.containers, docker.containers.discovery, docker.data_usage, docker.images, docker.images.discovery, docker.info, docker.ping |
Supported keys can be used with Zabbix agent 2 only. See also: Configuration parameters |
File | File metrics collection. | vfs.file.cksum, vfs.file.contents, vfs.file.exists, vfs.file.md5sum, vfs.file.regexp, vfs.file.regmatch, vfs.file.size, vfs.file.time |
Supported keys have the same parameters as Zabbix agent keys. |
Kernel | Kernel monitoring. | kernel.maxfiles, kernel.maxproc | Supported keys have the same parameters as Zabbix agent keys. |
Log | Log file monitoring. | log, log.count, logrt, logrt.count | Supported keys have the same parameters as Zabbix agent keys. See also: Plugin configuration parameters (Unix/Windows) |
Memcached | Memcached server monitoring. | memcached.ping, memchached.stats | Supported keys can be used with Zabbix agent 2 only. See also: - Plugin documentation - Configuration parameters |
Modbus | Reads Modbus data. | modbus.get | Supported keys have the same parameters as Zabbix agent keys. See also: - Plugin documentation - Configuration parameters |
MongoDB | Monitoring of MongoDB servers and clusters (document-based, distributed database). | mongodb.collection.stats, mongodb.collections.discovery, mongodb.collections.usage, mongodb.connpool.stats, mongodb.db.stats, mongodb.db.discovery, mongodb.jumbo_chunks.count, mongodb.oplog.stats, mongodb.ping, mongodb.rs.config, mongodb.rs.status, mongodb.server.status, mongodb.sh.discovery |
Supported MongoDB versions: 2.6-5.3. Supported keys can be used with Zabbix agent 2 only. Plugins.MongoDB.System.Path variable needs to be set in Zabbix agent 2 configuration file with the path to the MongoDB plugin executable. See also: - Plugin documentation - Configuration parameters |
MQTT | Receives published values of MQTT topics. | mqtt.get | Supported keys can be used with Zabbix agent 2 only. See also: - Plugin documentation - Configuration parameters |
MySQL | Monitoring of MySQL and its forks. | mysql.db.discovery, mysql.db.size, mysql.get_status_variables, mysql.ping, mysql.replication.discovery, mysql.replication.get_slave_status, mysql.version |
To configure encrypted connection to the database, use named sessions and specify TLS parameters for the named session in the agent configuration file. Currently, TLS parameters cannot be passed as item key parameters. Supported keys can be used with Zabbix agent 2 only. See also: - Plugin documentation - Configuration parameters |
NetIf | Monitoring of network interfaces. | net.if.collisions, net.if.discovery, net.if.in, net.if.out, net.if.total | Supported keys have the same parameters as Zabbix agent keys. |
Oracle | Oracle Database monitoring. | oracle.diskgroups.stats, oracle.diskgroups.discovery, oracle.archive.info, oracle.archive.discovery, oracle.cdb.info, oracle.custom.query, oracle.datafiles.stats, oracle.db.discovery, oracle.fra.stats, oracle.instance.info, oracle.pdb.info, oracle.pdb.discovery, oracle.pga.stats, oracle.ping, oracle.proc.stats, oracle.redolog.info, oracle.sga.stats, oracle.sessions.stats, oracle.sys.metrics, oracle.sys.params, oracle.ts.stats, oracle.ts.discovery, oracle.user.info |
Install the Oracle Instant Client before using the plugin. Supported keys can be used with Zabbix agent 2 only. See also: - Plugin documentation - Configuration parameters |
PostgreSQL | Monitoring of PostgreSQL and its forks. | pgsql.autovacuum.count, pgsql.archive, pgsql.bgwriter, pgsql.cache.hit, pgsql.connections, pgsql.custom.query, pgsql.dbstat, pgsql.dbstat.sum, pgsql.db.age, pgsql.db.bloating_tables, pgsql.db.discovery, pgsql.db.size, pgsql.locks, pgsql.oldest.xid, pgsql.ping, pgsql.queries, pgsql.replication.count, pgsql.replication.process, pgsql.replication.process.discovery, pgsql.replication.recovery_role, pgsql.replication.status, pgsql.replication_lag.b, pgsql.replication_lag.sec, pgsql.uptime, pgsql.wal.stat |
To configure encrypted connection to the database, use named sessions and specify TLS parameters for the named session in the agent configuration file. Currently, TLS parameters cannot be passed as item key parameters. Supported keys can be used with Zabbix agent 2 only. It is possible to extend functionality of the plugin with user-defined queries - see Plugin documentation for details. See also: Configuration parameters |
Proc | Process CPU utilization percentage. | proc.cpu.util | Supported key has the same parameters as Zabbix agent key. |
Redis | Redis server monitoring. | redis.config, redis.info, redis.ping, redis.slowlog.count | Supported keys can be used with Zabbix agent 2 only. See also: - Plugin documentation - Configuration parameters |
Smart | S.M.A.R.T. monitoring. | smart.attribute.discovery, smart.disk.discovery, smart.disk.get | Sudo/root access rights to smartctl are required for the user executing Zabbix agent 2. The minimum required smartctl version is 7.1. Supported keys can be used with Zabbix agent 2 only on Linux/Windows, both as a passive and active check. See also: Configuration parameters |
Swap | Swap space size in bytes/percentage. | system.swap.size | Supported key has the same parameters as Zabbix agent key. |
SystemRun | Runs specified command. | system.run | Supported key has the same parameters as Zabbix agent key. See also: Plugin configuration parameters (Unix/Windows) |
Systemd | Monitoring of systemd services. | systemd.unit.discovery, systemd.unit.get, systemd.unit.info | Supported keys can be used with Zabbix agent 2 only. |
TCP | TCP connection availability check. | net.tcp.port | Supported key has the same parameters as Zabbix agent key. |
UDP | Monitoring of the UDP services avaiability and performance. | net.udp.service, net.udp.service.perf | Supported keys have the same parameters as Zabbix agent keys. |
Uname | Retrieval of information about the system. | system.hostname, system.sw.arch, system.uname | Supported keys have the same parameters as Zabbix agent keys. |
Uptime | System uptime metrics collection. | system.uptime | Supported key has the same parameters as Zabbix agent key. |
VFSDev | VFS metrics collection. | vfs.dev.discovery, vfs.dev.read, vfs.dev.write | Supported keys have the same parameters as Zabbix agent keys. |
WebCertificate | Monitoring of TLS/SSL website certificates. | web.certificate.get | Supported key can be used with Zabbix agent 2 only. |
WebPage | Web page monitoring. | web.page.get, web.page.perf, web.page.regexp | Supported keys have the same parameters as Zabbix agent keys. |
ZabbixAsync | Asynchronous metrics collection. | net.tcp.listen, net.udp.listen, sensor, system.boottime, system.cpu.intr, system.cpu.load, system.cpu.switches, system.hw.cpu, system.hw.macaddr, system.localtime, system.sw.os, system.swap.in, system.swap.out, vfs.fs.discovery |
Supported keys have the same parameters as Zabbix agent keys. |
ZabbixStats | Zabbix server/proxy internal metrics or number of delayed items in a queue. | zabbix.stats | Supported keys have the same parameters as Zabbix agent keys. |
ZabbixSync | Synchronous metrics collection. | net.dns, net.dns.record, net.tcp.service, net.tcp.service.perf, proc.mem, proc.num, system.hw.chassis, system.hw.devices, system.sw.packages, system.users.num, vfs.dir.count, vfs.dir.size, vfs.fs.get, vfs.fs.inode, vfs.fs.size, vm.memory.size. |
Supported keys have the same parameters as Zabbix agent keys. |