MySQLプラグイン

概要

設定パラメーターを使用すると、MySQLプラグインの動作をカスタマイズできます。

これらは、エージェント 2 の設定ファイルではなく、専用の設定ファイル(例: mysql.conf)に指定することを推奨します。その後、Include ディレクティブを使用して、このファイルを Zabbix エージェント 2 の設定に含めます。

パラメーターが必須であると明示されていない限り、すべてのパラメーターは任意です。

次の点に注意してください。

  • デフォルト値は、同梱されている設定ファイルの値ではなく、プロセスのデフォルトを反映します。
  • 値は環境変数をサポートします。
  • Zabbix がサポートする設定ファイルの文字エンコーディングは UTF-8 のみで、BOM は含められません。
  • "#" で始まるコメントは、行頭でのみサポートされます。

Parameter details

Plugins.Mysql.CallTimeout

Specify the maximum amount of time in seconds to wait for a request to be done.

Default: default timeout Range: 1-30

Plugins.Mysql.CustomQueriesPath

Specify full pathname of the directory containing .sql files with custom queries.

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

Plugins.Mysql.CustomQueriesEnabled

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

Default: false Range: true/false

Plugins.Mysql.Default.Password

Specify the default password for a protected MySQL server.

Plugins.Mysql.Default.TLSConnect

Specify the default level of encryption for communications between Zabbix agent 2 and monitored databases.

Range:
required - require TLS connection;
verify_ca - verify certificates;
verify_full - verify certificates and IP address

Plugins.Mysql.Default.TLSCAFile

Specify full pathname of the file containing top-level CA(s) certificates for peer certificate verification, used for encrypted communications between Zabbix agent 2 and monitored databases.

Mandatory: yes, if Plugins.Mysql.Default.TLSConnect is set to verify_ca or verify_full

Plugins.Mysql.Default.TLSCertFile

Specify full pathname of the file containing the agent certificate or certificate chain, used for encrypted communications between Zabbix agent 2 and monitored databases.

Mandatory: yes, if Plugins.Mysql.Default.TLSKeyFile is specified

Plugins.Mysql.Default.TLSKeyFile

Specify full pathname of the file containing the database private key, used for encrypted communications between Zabbix agent 2 and monitored databases.

Mandatory: yes, if Plugins.Mysql.Default.TLSCertFile is specified

Plugins.Mysql.Default.Uri

Specify the default URI for connecting to MySQL server.
Embedded credentials will be ignored.
Supported schemes: tcp, unix
The schema can be omitted.
The port can be omitted (default=3306).

Examples:

tcp://localhost:3306
localhost
unix:/var/run/mysql.sock
Plugins.Mysql.Default.User

Specify the default username for a protected MySQL server.

Plugins.Mysql.KeepAlive

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

Default: 300 Range: 60-900

Plugins.Mysql.Sessions.<SessionName>.Password

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

Plugins.Mysql.Sessions.<SessionName>.TLSConnect

Specify the level of named-session encryption for communications between Zabbix agent 2 and monitored databases.
<SessionName> - define name of a session for using in item keys.

Range:
required - require TLS connection;
verify_ca - verify certificates;
verify_full - verify certificates and IP address

Plugins.Mysql.Sessions.<SessionName>.TLSCAFile

Specify full pathname of the file containing top-level CA(s) certificates for named-session 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.

Mandatory: yes, if Plugins.Mysql.Sessions.<SessionName>.TLSConnect is set to verify_ca or verify_full

Plugins.Mysql.Sessions.<SessionName>.TLSCertFile

Specify full pathname of the file containing the named-session 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.

Mandatory: yes, if Plugins.Mysql.Sessions.<SessionName>.TLSKeyFile is specified

Plugins.Mysql.Sessions.<SessionName>.TLSKeyFile

Specify full pathname of the file containing the named-session 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.

Mandatory: yes, if Plugins.Mysql.Sessions.<SessionName>.TLSCertFile is specified

Plugins.Mysql.Sessions.<SessionName>.Uri

Specify the named session URI for connecting to MySQL server.
<SessionName> - define name of a session for using in item keys.
Embedded credentials will be ignored.
Supported schemes: tcp, unix
The schema can be omitted.
The port can be omitted (default=3306).

Examples:

tcp://localhost:3306
localhost
unix:/var/run/mysql.sock
Plugins.Mysql.Sessions.<SessionName>.User

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

Plugins.Mysql.Timeout

Set the maximum time in seconds for waiting when a connection has to be established.

Default: default timeout Range: 1-30

パラメータ

Parameter Mandatory Range Default Description
Plugins.Mysql.CallTimeout no 1-30 global timeout 要求の処理が完了するまで待機する最大時間(秒)。
Plugins.Mysql.CustomQueriesPath no Unix システムでは /usr/local/share/zabbix/custom-queries/mysql

Windows システムでは *:\Program Files\Zabbix Agent 2\Custom Queries\Mysql。ここで *ProgramFiles 環境変数のドライブ名です。
カスタムクエリを含む .sql ファイルが格納されたディレクトリのフルパス。
Plugins.Mysql.CustomQueriesEnabled no false 設定すると、mysql.custom.query アイテムキーの実行を有効にします。無効の場合、カスタムクエリディレクトリのパスからクエリは読み込まれません。
Plugins.Mysql.Default.Password no MySQL 接続用のデフォルトパスワード。アイテムキーまたは名前付きセッションで値が指定されていない場合に使用されます。
Plugins.Mysql.Default.TLSCAFile no
(yes, if Plugins.Mysql.Default.TLSConnect is set to verify_ca or verify_full)
Zabbix エージェント 2 と監視対象データベース間の暗号化通信におけるピア証明書検証用の、最上位 CA 証明書を含むファイルのフルパス。名前付きセッションで値が指定されていない場合に使用されます。
Plugins.Mysql.Default.TLSCertFile no
(yes, if Plugins.Mysql.Default.TLSConnect is set to verify_ca or verify_full)
Zabbix エージェント 2 と監視対象データベース間の暗号化通信における、エージェント証明書または証明書チェーンを含むファイルのフルパス。名前付きセッションで値が指定されていない場合に使用されます。
Plugins.Mysql.Default.TLSConnect no Zabbix エージェント 2 と監視対象データベース間の通信に使用する暗号化方式。名前付きセッションで値が指定されていない場合に使用されます。

サポートされる値:
required - TLS 接続を必須にする;
verify_ca - 証明書を検証する;
verify_full - 証明書と IP アドレスを検証する。
Plugins.Mysql.Default.TLSKeyFile no
(yes, if Plugins.Mysql.Default.TLSConnect is set to verify_ca or verify_full)
Zabbix エージェント 2 と監視対象データベース間の暗号化通信に使用するデータベース秘密鍵を含むファイルのフルパス。名前付きセッションで値が指定されていない場合に使用されます。
Plugins.Mysql.Default.Uri no tcp://localhost:3306 MySQL 接続用のデフォルト URI。アイテムキーまたは名前付きセッションで値が指定されていない場合に使用されます。

埋め込み資格情報を含めないでください(無視されます)。
URI 形式に一致している必要があります。
サポートされるスキーム: tcp, unix。スキームは省略できます。
ポートは省略できます(default=3306)。
例: tcp://localhost:3306
localhost
unix:/var/run/mysql.sock
Plugins.Mysql.Default.User no MySQL 接続用のデフォルトユーザー名。アイテムキーまたは名前付きセッションで値が指定されていない場合に使用されます。
Plugins.Mysql.KeepAlive no 60-900 300 未使用のプラグイン接続を閉じるまでの最大待機時間(秒)。
Plugins.Mysql.Sessions.<SessionName>.Password no 名前付きセッションのパスワード。
<SessionName> - アイテムキーで使用するセッション名を定義します。
Plugins.Mysql.Sessions.<SessionName>.TLSCAFile no
(yes, if Plugins.Mysql.Sessions.<SessionName>.TLSConnect is set to verify_ca or verify_full)
Zabbix エージェント 2 と監視対象データベース間の暗号化通信で使用する、ピア証明書検証用の最上位 CA 証明書を含むファイルのフルパス。
<SessionName> - アイテムキーで使用するセッション名を定義します。
Plugins.Mysql.Sessions.<SessionName>.TLSCertFile yes, if Plugins.Mysql.Sessions.<SessionName>.TLSKeyFile is specified Zabbix エージェント 2 と監視対象データベース間の暗号化通信で使用する、エージェント証明書または証明書チェーンを含むファイルのフルパス。
<SessionName> - アイテムキーで使用するセッション名を定義します。
Plugins.Mysql.Sessions.<SessionName>.TLSConnect no Zabbix エージェント 2 と監視対象データベース間の通信に使用する暗号化方式。
<SessionName> - アイテムキーで使用するセッション名を定義します。

サポートされる値:
required - TLS 接続を必須にする;
verify_ca - 証明書を検証する;
verify_full - 証明書と IP アドレスを検証する。
Plugins.Mysql.Sessions.<SessionName>.TLSKeyFile yes, if Plugins.Mysql.Sessions.<SessionName>.TLSCertFile is specified Zabbix エージェント 2 と監視対象データベース間の暗号化通信で使用するデータベース秘密鍵を含むファイルのフルパス。
<SessionName> - アイテムキーで使用するセッション名を定義します。
Plugins.Mysql.Sessions.<SessionName>.Uri no 名前付きセッションの接続文字列。
<SessionName> - アイテムキーで使用するセッション名を定義します。

埋め込み資格情報を含めないでください(無視されます)。
URI 形式に一致している必要があります。
サポートされるスキーム: tcp, unix。スキームは省略できます。
ポートは省略できます(default=3306)。
例: tcp://localhost:3306
localhost
unix:/var/run/mysql.sock
Plugins.Mysql.Sessions.<SessionName>.User no 名前付きセッションのユーザー名。
<SessionName> - アイテムキーで使用するセッション名を定義します。
Plugins.Mysql.Timeout no 1-30 global timeout 接続を確立する必要がある場合の最大待機時間(秒)。

See also: