2 Plugins

Overview

Plugins provide an option to extend the monitoring capabilities of Zabbix. Plugins are written in Go programming language and are supported by Zabbix agent 2 only. Plugins provide an alternative to loadable modules (written in C), and other methods for extending Zabbix functionality.

The following features are specific to agent 2 and its plugins:

  • support of scheduled and flexible intervals for both passive and active checks;
  • task queue management with respect to schedule and task concurrency;
  • plugin-level timeouts;
  • compatibility check of Zabbix agent 2 and its plugins on start up.

Since Zabbix 6.0.0, plugins don’t have to be integrated into the agent 2 directly and can be added as loadable plugins, thus making the creation process of additional plugins for gathering new monitoring metrics easier.

This page lists Zabbix native and loadable plugins, and describes plugin configuration principles from the user perspective. For instructions about writing your own plugins, please see Plugin development guidelines. Metrics collection process provides a detailed description of the entire metrics collection process including the methods applied and the connection diagram.

Configuring plugins

This section provides common plugin configuration principles and best practices.

All plugins are configured using Plugins.* parameter, which can either be part of the Zabbix agent 2 configuration file or a plugin’s own configuration file. If a plugin uses a separate configuration file, path to this file should be specified in the Include parameter of Zabbix agent 2 configuration file.

Each plugin parameter should have the following structure:

Plugins.<PluginName>.<Parameter>=<Value>

Parameter names should adhere to the following requirements:

  • it is recommended to capitalize the names of your plugins;
  • the parameter should be capitalized;
  • special characters are not allowed;
  • nesting isn’t limited by a maximum level;
  • the number of parameters is not limited.
Named sessions

Named sessions represent an additional level of plugin parameters and can be used to define separate sets of authentication parameters for each of the instances being monitored. Each named session parameter should have the following structure:

Plugins.<PluginName>.<SessionName>.<Parameter>=<Value>

A session name can be used as a connString item key parameter instead of specifying a URI, username, and password separately. In item keys, the first parameter can be either a connString or a Uri. If the first key parameter matches a session name specified in the configuration file, the check will be executed using named session parameters. If the first key parameter doesn’t match any session name, it will be treated as a Uri.

Note, that:

  • when providing a connString (session name) in key parameters, key parameters for username and password must be empty;
  • passing embedded URI credentials is not supported, consider using named sessions instead;
  • in case an authentication parameter is not specified for the named session, a hardcoded default value will be used.

The list of available named session parameters depends on the plugin, see individual plugin configuration files for details.

Example: Monitoring of two instances “MySQL1” and “MySQL2” can be configured in the following way:

  1. Plugins.Mysql.Sessions.MySQL1.Uri=tcp://127.0.0.1:3306
  2. Plugins.Mysql.Sessions.MySQL1.User=<UsernameForMySQL1>
  3. Plugins.Mysql.Sessions.MySQL1.Password=<PasswordForMySQL1>
  4. Plugins.Mysql.Sessions.MySQL2.Uri=tcp://127.0.0.1:3307
  5. Plugins.Mysql.Sessions.MySQL2.User=<UsernameForMySQL2>
  6. Plugins.Mysql.Sessions.MySQL2.Password=<PasswordForMySQL2>

Now, these names may be used as connStrings in keys instead of URIs:

  1. mysql.ping[MySQL1]
  2. mysql.ping[MySQL2]
Example 1

Monitoring of two instances “MySQL1” and “MySQL2”.

Configuration parameters:

  1. Plugins.Mysql.Sessions.MySQL1.Uri=tcp://127.0.0.1:3306
  2. Plugins.Mysql.Sessions.MySQL1.User=mysql1_user
  3. Plugins.Mysql.Sessions.MySQL1.Password=unique_password
  4. Plugins.Mysql.Sessions.MySQL2.Uri=tcp://192.0.2.0:3306
  5. Plugins.Mysql.Sessions.MySQL2.User=mysql2_user
  6. Plugins.Mysql.Sessions.MySQL2.Password=different_password

Item keys: mysql.ping[MySQL1], mysql.ping[MySQL2]

Example 2

Providing some of the parameters in the item key (supported since Zabbix 6.4.2).

Configuration parameters:

  1. Plugins.Postgres.Sessions.Session1.Uri=tcp://192.0.2.234:5432
  2. Plugins.Postgres.Sessions.Session1.User=old_username
  3. Plugins.Postgres.Sessions.Session1.Password=session_password

Item key: pgsql.ping[session1,new_username,,postgres]

As a result of this configuration, the agent will connect to PostgreSQL using the following parameters:

  • URI from session parameter: 192.0.2.234:5432
  • Username from the item key: new_username
  • Password from session parameter (since it is omitted in the item key): session_password
  • Database name from the item key: postgres
Hardcoded defaults

If a parameter required for authentication is not provided in an item key or in the named session parameters, the plugin will use a hardcoded default value.

Connections

Some plugins support gathering metrics from multiple instances simultaneously. Both local and remote instances can be monitored. TCP and Unix-socket connections are supported.

It is recommended to configure plugins to keep connections to instances in an open state. The benefits are reduced network congestion, latency, and CPU and memory usage due to the lower number of connections. The client library takes care of this.

Time period for which unused connections should remain open can be determined by Plugins.<PluginName>.KeepAlive parameter. Example: Plugins.Memcached.KeepAlive

Plugins supplied out-of-the-box

All metrics supported by Zabbix agent 2 are collected by plugins.

All the loadable plugins, for instance MongoDB, when launched with: - -V version - print plugin version and license information; - -h help - print help information.

The following plugins for Zabbix agent 2 are available out-of-the-box:

Plugin nameDescriptionSupported item keysComments
AgentMetrics of the Zabbix agent being used.agent.hostname, agent.ping, agent.versionSupported keys have the same parameters as Zabbix agent keys.

See the Agent plugin source code here.
CephCeph 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.
CPUSystem CPU monitoring (number of CPUs/CPU cores, discovered CPUs, utilization percentage).system.cpu.discovery, system.cpu.num, system.cpu.utilSupported keys have the same parameters as Zabbix agent keys.

See the CPU plugin source code here.
DockerMonitoring 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.

See the Docker plugin source code here.
FileFile 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.

See the File plugin source code here.
KernelKernel monitoring.kernel.maxfiles, kernel.maxprocSupported keys have the same parameters as Zabbix agent keys.

See the Kernel plugin source code here.
LogLog file monitoring.log, log.count, logrt, logrt.countSupported keys have the same parameters as Zabbix agent keys.

See also:
Plugin configuration parameters (Unix/Windows)

See the Log plugin source code here.
MemcachedMemcached server monitoring.memcached.ping, memchached.statsSupported keys can be used with Zabbix agent 2 only.

See also:
- Plugin documentation
- Configuration parameters
ModbusReads Modbus data.modbus.getSupported keys have the same parameters as Zabbix agent keys.

See also:
- Plugin documentation
- Configuration parameters
MongoDBMonitoring 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
MQTTReceives published values of MQTT topics.mqtt.getSupported keys can be used with Zabbix agent 2 only.

See also:
- Plugin documentation
- Configuration parameters
MySQLMonitoring 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
NetIfMonitoring of network interfaces.net.if.collisions, net.if.discovery, net.if.in, net.if.out, net.if.totalSupported keys have the same parameters as Zabbix agent keys.

See the NetIf plugin source code here.
OracleOracle 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
PostgreSQLMonitoring 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
ProcProcess CPU utilization percentage.proc.cpu.utilSupported key has the same parameters as Zabbix agent key.

See the Proc plugin source code here.
RedisRedis server monitoring.redis.config, redis.info, redis.ping, redis.slowlog.countSupported keys can be used with Zabbix agent 2 only.

See also:
- Plugin documentation
- Configuration parameters
SmartS.M.A.R.T. monitoring.smart.attribute.discovery, smart.disk.discovery, smart.disk.getSudo/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

See the Smart plugin source code here.
SwapSwap space size in bytes/percentage.system.swap.sizeSupported key has the same parameters as Zabbix agent key.

See the Swap plugin source code here.
SystemRunRuns specified command.system.runSupported key has the same parameters as Zabbix agent key.

See also:
Plugin configuration parameters (Unix/Windows)
SystemdMonitoring of systemd services.systemd.unit.discovery, systemd.unit.get, systemd.unit.infoSupported keys can be used with Zabbix agent 2 only.

See the Systemd plugin source code here.
TCPTCP connection availability check.net.tcp.portSupported key has the same parameters as Zabbix agent key.

See the TCP plugin source code here.
UDPMonitoring of the UDP services availability and performance.net.udp.service, net.udp.service.perfSupported keys have the same parameters as Zabbix agent keys.

See the UDP plugin source code here.
UnameRetrieval of information about the system.system.hostname, system.sw.arch, system.unameSupported keys have the same parameters as Zabbix agent keys.

See the Uname plugin source code here.
UptimeSystem uptime metrics collection.system.uptimeSupported key has the same parameters as Zabbix agent key.

See the Uptime plugin source code here.
VFSDevVFS metrics collection.vfs.dev.discovery, vfs.dev.read, vfs.dev.writeSupported keys have the same parameters as Zabbix agent keys.

See the VFSDEv plugin source code here.
WebCertificateMonitoring of TLS/SSL website certificates.web.certificate.getSupported key can be used with Zabbix agent 2 only.

See the WebCertificate plugin source code here.
WebPageWeb page monitoring.web.page.get, web.page.perf, web.page.regexpSupported keys have the same parameters as Zabbix agent keys.

See the WebPage plugin source code here.
ZabbixAsyncAsynchronous 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.

See the ZabbixAsync plugin source code here.
ZabbixStatsZabbix server/proxy internal metrics or number of delayed items in a queue.zabbix.statsSupported keys have the same parameters as Zabbix agent keys.

See the ZabbixStats plugin source code here.
ZabbixSyncSynchronous 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.

See the ZabbixSync plugin source code here.
Built-in

The following plugins for Zabbix agent 2 are available out-of-the-box. Click on the plugin name to go to the plugin repository with additional information.

Plugin nameDescriptionSupported item keysComments
AgentMetrics of the Zabbix agent being used.agent.hostname, agent.ping, agent.versionSupported keys have the same parameters as Zabbix agent keys.
CephCeph monitoring.ceph.df.details, ceph.osd.stats, ceph.osd.discovery, ceph.osd.dump,
ceph.ping, ceph.pool.discovery, ceph.status
CPUSystem CPU monitoring (number of CPUs/CPU cores, discovered CPUs, utilization percentage).system.cpu.discovery, system.cpu.num, system.cpu.utilSupported keys have the same parameters as Zabbix agent keys.
DockerMonitoring 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
See also:
Configuration parameters
FileFile 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.
KernelKernel monitoring.kernel.maxfiles, kernel.maxprocSupported keys have the same parameters as Zabbix agent keys.
LogLog file monitoring.log, log.count, logrt, logrt.countSupported keys have the same parameters as Zabbix agent keys.

See also:
Plugin configuration parameters (Unix/Windows)
MemcachedMemcached server monitoring.memcached.ping, memchached.stats
ModbusReads Modbus data.modbus.getSupported keys have the same parameters as Zabbix agent keys.
MQTTReceives published values of MQTT topics.mqtt.get
MySQLMonitoring 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 the TLS parameters for the named session in the agent configuration file. Currently, TLS parameters cannot be passed as item key parameters.
NetIfMonitoring of network interfaces.net.if.collisions, net.if.discovery, net.if.in, net.if.out, net.if.totalSupported keys have the same parameters as Zabbix agent keys.
OracleOracle 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.
ProcProcess CPU utilization percentage.proc.cpu.utilSupported key has the same parameters as Zabbix agent key.
RedisRedis server monitoring.redis.config, redis.info, redis.ping, redis.slowlog.count
SmartS.M.A.R.T. monitoring.smart.attribute.discovery, smart.disk.discovery, smart.disk.getSudo/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
SwapSwap space size in bytes/percentage.system.swap.sizeSupported key has the same parameters as Zabbix agent key.
SystemRunRuns specified command.system.runSupported key has the same parameters as Zabbix agent key.

See also:
Plugin configuration parameters (Unix/Windows)
SystemdMonitoring of systemd services.systemd.unit.discovery, systemd.unit.get, systemd.unit.info
TCPTCP connection availability check.net.tcp.portSupported key has the same parameters as Zabbix agent key.
UDPMonitoring of the UDP services availability and performance.net.udp.service, net.udp.service.perfSupported keys have the same parameters as Zabbix agent keys.
UnameRetrieval of information about the system.system.hostname, system.sw.arch, system.unameSupported keys have the same parameters as Zabbix agent keys.
UptimeSystem uptime metrics collection.system.uptimeSupported key has the same parameters as Zabbix agent key.
VFSDevVFS metrics collection.vfs.dev.discovery, vfs.dev.read, vfs.dev.writeSupported keys have the same parameters as Zabbix agent keys.
WebCertificateMonitoring of TLS/SSL website certificates.web.certificate.get
WebPageWeb page monitoring.web.page.get, web.page.perf, web.page.regexpSupported keys have the same parameters as Zabbix agent keys.
ZabbixAsyncAsynchronous 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.
ZabbixStatsZabbix server/proxy internal metrics or number of delayed items in a queue.zabbix.statsSupported keys have the same parameters as Zabbix agent keys.
ZabbixSyncSynchronous 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.
Loadable

Loadable plugins, when launched with:
- -V —version - print plugin version and license information;
- -h —help - print help information.

Click on the plugin name to go to the plugin repository with additional information.

Plugin nameDescriptionSupported item keysComments
MongoDBMonitoring 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
PostgreSQLMonitoring 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
This plugin is loadable since Zabbix 6.0.10 (built-in previously).

To configure encrypted connections to the database, use named sessions and specify the TLS parameters for the named session in the agent configuration file. Currently, TLS parameters cannot be passed as item key parameters.

See also: Building loadable plugins.