- PostgreSQLプラグイン
- Parameter details
- Plugins.PostgreSQL.CallTimeout
- Plugins.PostgreSQL.CustomQueriesPath
- Plugins.PostgreSQL.CustomQueriesEnabled
- Plugins.PostgreSQL.Default.CacheMode
- Plugins.PostgreSQL.Default.Database
- Plugins.PostgreSQL.Default.Password
- Plugins.PostgreSQL.Default.TLSCAFile
- Plugins.PostgreSQL.Default.TLSCertFile
- Plugins.PostgreSQL.Default.TLSConnect
- Plugins.PostgreSQL.Default.TLSKeyFile
- Plugins.PostgreSQL.Default.Uri
- Plugins.PostgreSQL.Default.User
- Plugins.PostgreSQL.KeepAlive
- Plugins.PostgreSQL.Sessions.<SessionName>.CacheMode
- Plugins.PostgreSQL.Sessions.<SessionName>.Database
- Plugins.PostgreSQL.Sessions.<SessionName>.Password
- Plugins.PostgreSQL.Sessions.<SessionName>.TLSCAFile
- Plugins.PostgreSQL.Sessions.<SessionName>.TLSCertFile
- Plugins.PostgreSQL.Sessions.<SessionName>.TLSConnect
- Plugins.PostgreSQL.Sessions.<SessionName>.TLSKeyFile
- Plugins.PostgreSQL.Sessions.<SessionName>.Uri
- Plugins.PostgreSQL.Sessions.<SessionName>.User
- Plugins.PostgreSQL.System.Path
- Plugins.PostgreSQL.Timeout
- オプション
- パラメーター
PostgreSQLプラグイン
概要
設定パラメータを使用すると、PostgreSQLプラグインの動作をカスタマイズできます。
これらは agent 2 の設定ファイルではなく、専用の設定ファイル(例: postgresql.conf)に指定することを推奨します。その後、Include ディレクティブを使用して、このファイルを Zabbix エージェント 2 の設定に含めます。
PostgreSQLプラグインはロード可能なプラグインであり、PostgreSQL plugin repository で利用可能で、詳細が説明されています。
すべてのパラメータは、パラメータが必須であると明示されていない限り、任意です。
注意:
- デフォルト値は、配布される設定ファイルの値ではなく、プロセスのデフォルト値を反映しています。
- 値は 環境変数 をサポートします。
- Zabbix がサポートする設定ファイルの文字エンコーディングは UTF-8 のみで、BOM は含められません。
\#で始まるコメントは、行頭でのみサポートされます。
Parameter details
Plugins.PostgreSQL.CallTimeout
Set the maximum wait time in seconds for a request to be completed.
Default: global timeout
Range: 1-30
Plugins.PostgreSQL.CustomQueriesPath
Specify full pathname of the directory containing .sql files with custom queries.
Defaults:/usr/local/share/zabbix/custom-queries/postgreSQL - for Unix systems,*:\Program Files\Zabbix Agent 2\Custom Queries\PostgreSQL - for Windows systems (where * is the drive name from the ProgramFiles environment variable)
Example:
/etc/zabbix/oracle/sql
Plugins.PostgreSQL.CustomQueriesEnabled
Enable execution of the postgresql.custom.query item key.
If disabled, no queries will be loaded from the custom query directory path.
Default: false
Range: true/false
Plugins.PostgreSQL.Default.CacheMode
Specify the default cache mode for the PostgreSQL connection.
Default: prepare
Range:prepare - create prepared statements on the PostgreSQL server;describe - use the anonymous prepared statement to describe a statement without creating a statement on the server.
Note that describe is primarily useful when the environment does not allow prepared statements such as when running a connection pooler like PgBouncer.
Plugins.PostgreSQL.Default.Database
Specify the default database for connecting to PostgreSQL.
Used if no value is specified in an item key or named session.
Plugins.PostgreSQL.Default.Password
Specify the default password for connecting to PostgreSQL.
Used if no value is specified in an item key or named session.
Plugins.PostgreSQL.Default.TLSCAFile
Specify full pathname of the file containing the top-level CA(s) certificate for peer certificate verification for encrypted communications between Zabbix agent 2 and monitored databases.
Used if no value is specified in a named session.
Mandatory: yes, if Plugins.PostgreSQL.Default.TLSConnect is set to verify_ca or verify_full
Plugins.PostgreSQL.Default.TLSCertFile
Specify full pathname of the file containing the PostgreSQL certificate or certificate chain for encrypted communications between Zabbix agent 2 and monitored databases.
Used if no value is specified in a named session.
Mandatory: yes, if Plugins.PostgreSQL.Default.TLSKeyFile is specified
Plugins.PostgreSQL.Default.TLSConnect
Specify the default level of encryption for communications between Zabbix agent 2 and monitored databases.
Used if no value is specified in a named session.
Range:required - connect using TLS as transport mode without identity checks;verify_ca - connect using TLS and verify certificate;verify_full - connect using TLS, verify certificate and verify that database identity (CN) specified by DBHost matches its certificate.
Undefined encryption type means unencrypted connection.
Plugins.PostgreSQL.Default.TLSKeyFile
Specify full pathname of the file containing the PostgreSQL private key for encrypted communications between Zabbix agent 2 and monitored databases.
Used if no value is specified in a named session.
Mandatory: yes, if Plugins.PostgreSQL.Default.TLSCertFile is specified
Plugins.PostgreSQL.Default.Uri
Specify the default URI for connecting to PostgreSQL.
Used if no value is specified in an item key or named session.
Embedded credentials will be ignored.
Must match the URI format.
Supported schemes: tcp, unix
Examples:
tcp://127.0.0.1:5432
tcp://localhost
unix:/var/run/postgresql/.s.PGSQL.5432
Plugins.PostgreSQL.Default.User
Specify the default username for connecting to PostgreSQL.
Used if no value is specified in an item key or named session.
Plugins.PostgreSQL.KeepAlive
Set the maximum time of waiting (in seconds) before unused plugin connections are closed.
Plugins.PostgreSQL.Sessions.<SessionName>.CacheMode
Specify the named session cache mode for the PostgreSQL connection.
<SessionName> - define name of a session for using in item keys.
Default: prepare
Range:prepare - create prepared statements on the PostgreSQL server;describe - use the anonymous prepared statement to describe a statement without creating a statement on the server.
Note that describe is primarily useful when the environment does not allow prepared statements such as when running a connection pooler like PgBouncer.
Plugins.PostgreSQL.Sessions.<SessionName>.Database
Specify the named session database for connecting to PostgreSQL.
<SessionName> - define name of a session for using in item keys.
Plugins.PostgreSQL.Sessions.<SessionName>.Password
Specify the named session password for connecting to PostgreSQL.
<SessionName> - define name of a session for using in item keys.
Must match the password format.
Plugins.PostgreSQL.Sessions.<SessionName>.TLSCAFile
Specify full pathname of the file containing the top-level CA(s) certificate for peer certificate verification 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.PostgreSQL.Sessions.<SessionName>.TLSConnect is set to verify_ca or verify_full
Plugins.PostgreSQL.Sessions.<SessionName>.TLSCertFile
Specify full pathname of the file containing the PostgreSQL certificate or certificate chain 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.PostgreSQL.Sessions.<SessionName>.TLSKeyFile is specified
Plugins.PostgreSQL.Sessions.<SessionName>.TLSConnect
Specify the named session level of encryption for communications between Zabbix agent 2 and monitored databases.
<SessionName> - define name of a session for using in item keys.
Range:required - connect using TLS as transport mode without identity checks;verify_ca - connect using TLS and verify certificate;verify_full - connect using TLS, verify certificate and verify that database identity (CN) specified by DBHost matches its certificate.
Undefined encryption type means unencrypted connection.
Plugins.PostgreSQL.Sessions.<SessionName>.TLSKeyFile
Specify full pathname of the file containing the PostgreSQL private key 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.PostgreSQL.Sessions.<SessionName>.TLSCertFile is specified.
Plugins.PostgreSQL.Sessions.<SessionName>.Uri
Specify the named session URI for connecting to PostgreSQL.
<SessionName> - define name of a session for using in item keys.
Embedded credentials will be ignored.
Must match the URI format.
Supported schemes: tcp, unix
Examples:
tcp://127.0.0.1:5432
tcp://localhost
unix:/var/run/postgresql/.s.PGSQL.5432
Plugins.PostgreSQL.Sessions.<SessionName>.User
Specify the named session username for connecting to PostgreSQL.
<SessionName> - define name of a session for using in item keys.
Plugins.PostgreSQL.System.Path
Specify path to the PostgreSQL plugin executable.
Mandatory: yes
Example:
Plugins.PostgreSQL.System.Path=/usr/libexec/zabbix/zabbix-agent2-plugin-postgresql
Plugins.PostgreSQL.Timeout
Set the request execution timeout (the duration, in seconds, to wait for a request to complete before shutting it down).
Default: global timeout
Range: 1-30
オプション
| Parameter | Description |
|---|---|
| -V --version | プラグインのバージョンとライセンス情報を表示します。 |
| -h --help | ヘルプ情報を表示します(省略形)。 |
| -t, --test <item key> | テスト用にプラグインを起動します(プラグイン設定は無視されます)。 |
パラメーター
| Parameter | Mandatory | Range | Default | Description |
|---|---|---|---|---|
| Plugins.PostgreSQL.Default.CacheMode | no | prepare | PostgreSQL接続のキャッシュモード。 サポートされる値: prepare (default) - PostgreSQLサーバー上でプリペアドステートメントを作成します; describe - サーバー上でステートメントを作成せずに、匿名のプリペアドステートメントを使用してステートメントを記述します。 「describe」は、PgBouncerのような接続プーラーを使用する場合など、環境がプリペアドステートメントを許可しないときに主に有用です。 |
|
| Plugins.PostgreSQL.CallTimeout | no | 1-30 | global timeout | リクエストが完了するまでの最大待機時間(秒)。 |
| Plugins.PostgreSQL.CustomQueriesPath | no | Unixシステムでは/usr/local/share/zabbix/custom-queries/postgreSQLWindowsシステムでは *:\Program Files\Zabbix Agent 2\Custom Queries\PostgreSQL。ここで*はProgramFiles環境変数のドライブ名です |
.sqlファイルを含むカスタムクエリ用ディレクトリのフルパス。 |
|
| Plugins.PostgreSQL.CustomQueriesEnabled | no | false | 設定すると、postgresql.custom.queryアイテムキーの実行を有効にします。無効の場合、カスタムクエリディレクトリのパスからクエリは読み込まれません。 |
|
| Plugins.PostgreSQL.Default.Database | no | PostgreSQL接続用のデフォルトデータベース。アイテムキーまたは名前付きセッションで値が指定されていない場合に使用されます。 | ||
| Plugins.PostgreSQL.Default.Password | no | PostgreSQL接続用のデフォルトパスワード。アイテムキーまたは名前付きセッションで値が指定されていない場合に使用されます。 | ||
| Plugins.PostgreSQL.Default.TLSCAFile | no (yes, if Plugins.PostgreSQL.Default.TLSConnect is set to verify_ca or verify_full) |
Zabbix agent 2と監視対象データベース間の暗号化通信におけるピア証明書検証用のトップレベルCA証明書を含むファイルのフルパス。名前付きセッションで値が指定されていない場合に使用されます。 | ||
| Plugins.PostgreSQL.Default.TLSCertFile | no (yes, if Plugins.PostgreSQL.Default.TLSConnect is set to verify_ca or verify_full) |
Zabbix agent 2と監視対象データベース間の暗号化通信におけるPostgreSQL証明書または証明書チェーンを含むファイルのフルパス。名前付きセッションで値が指定されていない場合に使用されます。 | ||
| Plugins.PostgreSQL.Default.TLSConnect | no | Zabbix agent 2と監視対象データベース間の通信に使用する暗号化方式。名前付きセッションで値が指定されていない場合に使用されます。 サポートされる値: required - ID確認なしでTLSを転送モードとして使用して接続します; verify_ca - TLSを使用して接続し、証明書を検証します; verify_full - TLSを使用して接続し、証明書を検証し、DBHostで指定されたデータベースID(CN)が証明書と一致することを検証します。 暗号化方式が未定義の場合は、暗号化されていない接続を意味します。 |
||
| Plugins.PostgreSQL.Default.TLSKeyFile | no (yes, if Plugins.PostgreSQL.Default.TLSConnect is set to verify_ca or verify_full) |
Zabbix agent 2と監視対象データベース間の暗号化通信におけるPostgreSQL秘密鍵を含むファイルのフルパス。名前付きセッションで値が指定されていない場合に使用されます。 | ||
| Plugins.PostgreSQL.Default.Uri | no | PostgreSQL接続用のデフォルトURI。アイテムキーまたは名前付きセッションで値が指定されていない場合に使用されます。 埋め込み資格情報を含めないでください(無視されます)。 URI形式に一致している必要があります。 サポートされるスキーム: tcp, unix。例: tcp://127.0.0.1:5432tcp://localhostunix:/var/run/postgresql/.s.PGSQL.5432 |
||
| Plugins.PostgreSQL.Default.User | no | PostgreSQL接続用のデフォルトユーザー名。アイテムキーまたは名前付きセッションで値が指定されていない場合に使用されます。 | ||
| Plugins.PostgreSQL.KeepAlive | no | 60-900 | 300 | 未使用のプラグイン接続を閉じるまでの最大待機時間(秒)。 |
| Plugins.PostgreSQL.Sessions.<SessionName>.CacheMode | no | prepare | PostgreSQL接続のキャッシュモード。 <SessionName> - アイテムキーで使用するセッション名を定義します。 サポートされる値: prepare (default) - PostgreSQLサーバー上でプリペアドステートメントを作成します; describe - サーバー上でステートメントを作成せずに、匿名のプリペアドステートメントを使用してステートメントを記述します。 「describe」は、PgBouncerのような接続プーラーを使用する場合など、環境がプリペアドステートメントを許可しないときに主に有用です。 |
|
| Plugins.PostgreSQL.Sessions.<SessionName>.Database | no | セッション接続用のデータベース。 <SessionName> - アイテムキーで使用するセッション名を定義します。 |
||
| Plugins.PostgreSQL.Sessions.<SessionName>.Password | no | Must match the password format. | セッション接続用のパスワード。 <SessionName> - アイテムキーで使用するセッション名を定義します。 |
|
| Plugins.PostgreSQL.Sessions.<SessionName>.TLSCAFile | no (yes, if Plugins.PostgreSQL.Sessions.<SessionName>.TLSConnect is set to verify_ca or verify_full) |
トップレベルCA証明書を含むファイルのフルパス。ピア証明書の検証に使用されます。 <SessionName> - アイテムキーで使用するセッション名を定義します。 |
||
| Plugins.PostgreSQL.Sessions.<SessionName>.TLSCertFile | yes, if Plugins.PostgreSQL.Sessions.<SessionName>.TLSKeyFile is specified | PostgreSQL証明書または証明書チェーンを含むファイルのフルパス。 <SessionName> - アイテムキーで使用するセッション名を定義します。 |
||
| Plugins.PostgreSQL.Sessions.<SessionName>.TLSConnect | no | PostgreSQL接続の暗号化方式。 <SessionName> - アイテムキーで使用するセッション名を定義します。 サポートされる値: required - ID確認なしでTLSを転送モードとして使用して接続します; verify_ca - TLSを使用して接続し、証明書を検証します; verify_full - TLSを使用して接続し、証明書を検証し、DBHostで指定されたデータベースID(CN)が証明書と一致することを検証します。 暗号化方式が未定義の場合は、暗号化されていない接続を意味します。 |
||
| Plugins.PostgreSQL.Sessions.<SessionName>.TLSKeyFile | yes, if Plugins.PostgreSQL.Sessions.<SessionName>.TLSCertFile is specified | PostgreSQL秘密鍵を含むファイルのフルパス。 <SessionName> - アイテムキーで使用するセッション名を定義します。 |
||
| Plugins.PostgreSQL.Sessions.<SessionName>.Uri | no | 名前付きセッションの接続文字列。 <SessionName> - アイテムキーで使用するセッション名を定義します。 埋め込み資格情報を含めないでください(無視されます)。 URI形式に一致している必要があります。 サポートされるスキーム: tcp, unix。例: tcp://127.0.0.1:5432tcp://localhostunix:/var/run/postgresql/.s.PGSQL.5432 |
||
| Plugins.PostgreSQL.Sessions.<SessionName>.User | no | 名前付きセッションのユーザー名。 <SessionName> - アイテムキーで使用するセッション名を定義します。 |
||
| Plugins.PostgreSQL.System.Path | yes | PostgreSQLプラグイン実行ファイルへのパス。 使用例: Plugins.PostgreSQL.System.Path=/usr/libexec/zabbix/zabbix-agent2-plugin-postgresql |
||
| Plugins.PostgreSQL.Timeout | no | 1-30 | global timeout | リクエスト実行のタイムアウト(リクエストの完了を待機してから停止するまでの秒数)。 |
See also:
- 一般的な Zabbix agent 2 の設定パラメーターの説明: Zabbix agent 2 (UNIX) / Zabbix agent 2 (Windows)
- プラグインの設定手順