MSSQL plugin

Overview

Configuration parameters allow customizing the MSSQL plugin behavior.

It is recommended to specify them in their own configuration file (e.g. mssql.conf), rather than in the agent 2 configuration file. Then use the Include directive to include this file in the Zabbix agent 2 configuration.

The MSSQL plugin is a loadable plugin and is available and fully described in the MSSQL plugin repository.

All parameters are optional, unless explicitly stated that the parameter is mandatory.

This page is structured as:

  • Parameter overview (to see full details of a parameter, click its name)
  • Parameter details
Parameter Description
Plugins.MSSQL.CustomQueriesDir Specify path to the directory containing user-defined .sql files with custom queries that the plugin can execute.
Plugins.MSSQL.CustomQueriesEnabled Enable execution of the mssql.custom.query item key.
Plugins.MSSQL.Default.CACertPath Specify the default file path to the public key certificate of the certificate authority (CA) that issued the certificate of the MSSQL server.
Plugins.MSSQL.Default.Database Specify the default database name.
Plugins.MSSQL.Default.Encrypt Specify the level of default encryption.
Plugins.MSSQL.Default.HostNameInCertificate Specify the common name (CN) of the MSSQL server certificate by default.
Plugins.MSSQL.Default.Password Specify the default password.
Plugins.MSSQL.Default.TLSMinVersion Specify the minimum TLS version by default.
Plugins.MSSQL.Default.TrustServerCertificate Trust the server certificate without validating it by default.
Plugins.MSSQL.Default.Uri Specify the default URI.
Plugins.MSSQL.Default.User Specify the default username.
Plugins.MSSQL.KeepAlive Specify the maximum time of waiting (in seconds) before unused plugin connections are closed.
Plugins.MSSQL.Sessions.<SessionName>.CACertPath Specify the named session file path to the public key certificate of the certificate authority (CA) that issued the certificate of the MSSQL server.
Plugins.MSSQL.Sessions.<SessionName>.Database Specify the named session database name.
Plugins.MSSQL.Sessions.<SessionName>.Encrypt Specify the level of named session encryption.
Plugins.MSSQL.Sessions.<SessionName>.HostNameInCertificate Specify the common name (CN) of the MSSQL server certificate for named session.
Plugins.MSSQL.Sessions.<SessionName>.Password Specify the named session password.
Plugins.MSSQL.Sessions.<SessionName>.TLSMinVersion Specify the named session minimum TLS version.
Plugins.MSSQL.Sessions.<SessionName>.TrustServerCertificate Trust the named session server certificate without validating it.
Plugins.MSSQL.Sessions.<SessionName>.Uri Specify the named session URI.
Plugins.MSSQL.Sessions.<SessionName>.User Specify the named session username.
Plugins.MSSQL.System.Path Specify path to the MSSQL plugin executable.
Plugins.MSSQL.Timeout Set the duration, in seconds, to wait for a server to respond when first connecting and on follow-up operations in the session.

Note that:

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

Parameter details

Plugins.MSSQL.CustomQueriesDir

Specify path to the directory containing user-defined .sql files with custom queries that the plugin can execute.
The plugin loads all available .sql files in the configured directory at startup. This means that any changes to the custom query files will not be reflected until the plugin is restarted. The plugin is started and stopped together with Zabbix agent 2.

Defaults:
/usr/local/share/zabbix/custom-queries/mssql - for Unix systems,
*:\Program Files\Zabbix Agent 2\Custom Queries\MSSQL - for Windows systems (where * is the drive name from the ProgramFiles environment variable)

Plugins.MSSQL.CustomQueriesEnabled

Enable execution of the mssql.custom.query item key.
If disabled, no queries will be loaded from the custom query directory path.

Default: false
Range: true/false

Plugins.MSSQL.Default.CACertPath

Specify the default file path to the public key certificate of the certificate authority (CA) that issued the certificate of the MSSQL server.
The certificate must be in PEM format.

Plugins.MSSQL.Default.Database

Specify the default database name.

Plugins.MSSQL.Default.Encrypt

Specify the level of default encryption.

Range:
true - data sending between plugin and server is encrypted;
false - data sending between plugin and server is not encrypted beyond the login packet;
strict - data sending between plugin and server is encrypted E2E using TDS8;
disable - data sending between plugin and server is not encrypted.

Plugins.MSSQL.Default.HostNameInCertificate

Specify the common name (CN) of the MSSQL server certificate by default.

Plugins.MSSQL.Default.Password

Specify the default password for a protected MSSQL server.

Plugins.MSSQL.Default.TLSMinVersion

Specify the minimum TLS version by default.

Range: 1.0, 1.1, 1.2, 1.3

Plugins.MSSQL.Default.TrustServerCertificate

Trust the server certificate without validating it by default.

Range: true, false

Plugins.MSSQL.Default.Uri

Specify the default URI for connecting to MSSQL server.
Embedded credentials will be ignored.
The only supported schema is sqlserver://.
The schema can be omitted.

Default: sqlserver://localhost:1433

Plugins.MSSQL.Default.User

Specify the default username for a protected MSSQL server.

Plugins.MSSQL.KeepAlive

Specify the maximum time of waiting (in seconds) before unused plugin connections are closed.

Default: 300
Range: 60-900

Plugins.MSSQL.Sessions.<SessionName>.CACertPath

Specify the named session file path to the public key certificate of the certificate authority (CA) that issued the certificate of the MSSQL server.
<SessionName> - define name of a session for using in item keys.
The certificate must be in PEM format.

Plugins.MSSQL.Sessions.<SessionName>.Database

Specify the named session database name.
<SessionName> - define name of a session for using in item keys.

Plugins.MSSQL.Sessions.<SessionName>.Encrypt

Specify the level of named session encryption.
<SessionName> - define name of a session for using in item keys.

Range:
true - data sending between plugin and server is encrypted;
false - data sending between plugin and server is not encrypted beyond the login packet;
strict - data sending between plugin and server is encrypted E2E using TDS8;
disable - data sending between plugin and server is not encrypted.

Plugins.MSSQL.Sessions.<SessionName>.HostNameInCertificate

Specify the common name (CN) of the MSSQL server certificate for named session.
<SessionName> - define name of a session for using in item keys.

Plugins.MSSQL.Sessions.<SessionName>.Password

Specify the named session password for a protected MSSQL server.
<SessionName> - define name of a session for using in item keys.

Plugins.MSSQL.Sessions.<SessionName>.TLSMinVersion

Specify the named session minimum TLS version.
<SessionName> - define name of a session for using in item keys.

Range: 1.0, 1.1, 1.2, 1.3

Plugins.MSSQL.Sessions.<SessionName>.TrustServerCertificate

Trust the named session server certificate without validating it.
<SessionName> - define name of a session for using in item keys.

Range: true, false

Plugins.MSSQL.Sessions.<SessionName>.Uri

Specify the named session URI for connecting to MSSQL server.
<SessionName> - define name of a session for using in item keys.
Embedded credentials will be ignored.
The only supported schema is sqlserver://.
The schema can be omitted.

Default: sqlserver://localhost:1433

Plugins.MSSQL.Sessions.<SessionName>.User

Specify the named session username for a protected MSSQL server.
<SessionName> - define name of a session for using in item keys.

Plugins.MSSQL.System.Path

Specify path to the MSSQL plugin executable.
Global setting for the MSSQL plugin. Applied to all connections.

Example: Plugins.MSSQL.System.Path=/usr/libexec/zabbix/zabbix-agent2-plugin-mssql

Plugins.MSSQL.Timeout

Set the duration, in seconds, to wait for a server to respond when first connecting and on follow-up operations in the session.

Default: global timeout
Range: 1-30

Options

Parameter Description
-V --version Print the plugin version and license information.
-h --help Print help information (shorthand).
-t, --test <item key> Launch plugin for testing (plugin config ignored).

See also