5 MongoDB plugin

Overview

This section lists parameters supported in the MongoDB Zabbix agent 2 plugin configuration file (mongo.conf).

Since Zabbix 6.0.6, MongoDB is a loadable plugin, which is available and fully described in the MongoDB plugin repository

Note that:

  • The default values reflect process defaults, not the values in the shipped configuration files;
  • Zabbix supports configuration files only in UTF-8 encoding without BOM;
  • Comments starting with "#" are only supported at the beginning of the line.

Options

Parameter Description
-V --version Print the plugin version and license information.
-h --help Print help information (shorthand).

Parameters

In Zabbix versions before 6.0.6, parameter names start with Plugins.Mongo.<Parameter> instead of Plugins.MongoDB.<Parameter>. For example, Plugins.Mongo.KeepAlive

Parameter Mandatory Range Default Description
Plugins.MongoDB.Default.Password no Default password for connecting to MongoDB; used if no value is specified in an item key or named session.
Supported since version 6.0.18
Plugins.MongoDB.Default.Uri no Default URI for connecting to MongoDB; used if no value is specified in an item key or named session.

Should not include embedded credentials (they will be ignored).
Must match the URI format.
Only tcp scheme is supported; a scheme can be omitted.
A port can be omitted (default=27017).
Examples: tcp://127.0.0.1:27017, tcp:localhost, localhost
Supported since version 6.0.18
Plugins.MongoDB.Default.User no Default username for connecting to MongoDB; used if no value is specified in an item key or named session.
Supported since version 6.0.18
Plugins.MongoDB.KeepAlive no 60-900 300 The maximum time of waiting (in seconds) before unused plugin connections are closed.
Plugins.MongoDB.Sessions.<SessionName>.Password no Named session password.
<SessionName> - define name of a session for using in item keys.
Plugins.MongoDB.Sessions.<SessionName>.TLSCAFile no
(yes, if Plugins.MongoDB.Sessions.<SessionName>.TLSConnect is set to one of: verify_ca, verify_full)
Full pathname of a file containing the top-level CA(s) certificates for peer certificate verification, used for encrypted communications between Zabbix agent 2 and monitored databases.
<SessionName> - define name of a session for using in item keys.

Supported in plugin versions 1.2.0, 6.0.13 and newer1.
Plugins.MongoDB.Sessions.<SessionName>.TLSCertFile yes, if Plugins.MongoDB.Sessions.<SessionName>.TLSKeyFile is specified

Before version 6.0.24 always mandatory if Plugins.MongoDB.Sessions.<SessionName>.TLSConnect is set to one of: verify_ca, verify_full
Full pathname of a file containing the agent certificate or certificate chain, used for encrypted communications between Zabbix agent 2 and monitored databases.
<SessionName> - define name of a session for using in item keys.

Supported in plugin versions 1.2.0, 6.0.13 and newer1.
Plugins.MongoDB.Sessions.<SessionName>.TLSConnect no Encryption type for communications between Zabbix agent 2 and monitored databases.
<SessionName> - define name of a session for using in item keys.

Supported values:
required - require TLS connection;
verify_ca - verify certificates;
verify_full - verify certificates and IP address.

Supported in plugin versions 1.2.0, 6.0.13 and newer1.
Plugins.MongoDB.Sessions.<SessionName>.TLSKeyFile yes, if Plugins.MongoDB.Sessions.<SessionName>.TLSCertFile is specified

Before version 6.0.24 always mandatory if Plugins.MongoDB.Sessions.<SessionName>.TLSConnect is set to one of: verify_ca, verify_full
Full pathname of a file containing the database private key used for encrypted communications between Zabbix agent 2 and monitored databases.
<SessionName> - define name of a session for using in item keys.

Supported in plugin versions 1.2.0, 6.0.13 and newer1.
Plugins.MongoDB.Sessions.<SessionName>.Uri no Connection string of a named session.
<SessionName> - define name of a session for using in item keys.

Should not include embedded credentials (they will be ignored).
Must match the URI format.
Only tcp scheme is supported; a scheme can be omitted.
A port can be omitted (default=27017).
Examples: tcp://127.0.0.1:27017, tcp:localhost, localhost
Plugins.MongoDB.Sessions.<SessionName>.User no Named session username.
<SessionName> - define name of a session for using in item keys.
Plugins.MongoDB.System.Path no Path to external plugin executable. Supported since Zabbix 6.0.6
Plugins.MongoDB.Timeout no 1-30 global timeout Request execution timeout (how long to wait for a request to complete before shutting it down).

See also:

Footnotes

1 - Since Zabbix 6.0.13, loadable plugins started using the same versioning system as Zabbix itself. As a result, MongoDB plugin version has changed from 1.2.0 to 6.0.13.