2 Plugins

    Overview

    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 . 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 . 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;
    • 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>

    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 for details.

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

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

    Example 1

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

    Configuration parameters:

    : ,

    Example 2

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

    Configuration 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:

    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.

    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.