- Oracle 插件
- Parameter details
- Plugins.Oracle.CallTimeout
- Plugins.Oracle.ConnectTimeout
- Plugins.Oracle.CustomQueriesPath
- Plugins.Oracle.CustomQueriesEnabled
- Plugins.Oracle.Default.Password
- Plugins.Oracle.Default.Service
- Plugins.Oracle.Default.Uri
- Plugins.Oracle.Default.User
- Plugins.Oracle.KeepAlive
- Plugins.Oracle.ResolveTNS
- Plugins.Oracle.Sessions.<SessionName>.Password
- Plugins.Oracle.Sessions.<SessionName>.Service
- Plugins.Oracle.Sessions.<SessionName>.Uri
- Plugins.Oracle.Sessions.<SessionName>.User
- 参数
Oracle 插件
概述
配置参数可用于自定义 Oracle 插件的行为。
建议将这些参数指定在它们自己的配置文件中(例如 oracle.conf),而不是放在 agent 2 配置文件中。然后使用 Include 指令将此文件包含到 Zabbix agent 2 配置中。
除非明确说明该参数为必填,否则所有参数均为可选。
请注意:
Parameter details
Plugins.Oracle.CallTimeout
Specify the maximum wait time in seconds for a request to be completed.
Default: default timeout
Range: 1-30
Plugins.Oracle.ConnectTimeout
Specify the maximum wait time in seconds for a connection to be established.
Default: default timeout
Range: 1-30
Plugins.Oracle.CustomQueriesPath
Specify full pathname of the directory containing .sql files with custom queries.
Defaults:/usr/local/share/zabbix/custom-queries/oracle - for Unix systems,*:\Program Files\Zabbix Agent 2\Custom Queries\Oracle - for Windows systems (where * is the drive name from the ProgramFiles environment variable)
Example:
/etc/zabbix/oracle/sql
Plugins.Oracle.CustomQueriesEnabled
Enable execution of the oracle.custom.query item key.
If disabled, no queries will be loaded from the custom query directory path.
Default: false
Range: true/false
Plugins.Oracle.Default.Password
Specify the default password for connecting to Oracle.
Used if no value is specified in an item key or named session.
Plugins.Oracle.Default.Service
Specify the default service name for connecting to Oracle (SID is not supported).
Used if no value is specified in an item key or named session.
Plugins.Oracle.Default.Uri
Specify the default URI for connecting to Oracle.
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, tcps
The schema can be omitted.
The port can be omitted (default=1521).
It is also possible to specify the TNS key or TNS value as the connection string. The TNS value must be composed without whitespaces.
Examples:
tcp://127.0.0.1:1521
localhost
zbx_tns_example (TNS key)
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=xe))) (TNS value)
Plugins.Oracle.Default.User
Specify the default username for connecting to Oracle.
Used if no value is specified in an item key or named session.
Plugins.Oracle.KeepAlive
Set the maximum time of waiting (in seconds) before unused plugin connections are closed.
Default: 300
Range: 60-900
Plugins.Oracle.ResolveTNS
Specify how to interpret the connection string (ConnString) for connecting to the Oracle server.
If it is set to false the default scheme and port will be added to ConnString (if absent).
If the option is set to true, the default scheme and port will be omitted (unless explicitly specified in ConnString), and ConnString will be passed to the Oracle client as is. If the Oracle client finds ConnString in the tnsnames.ora file, the connection description found will be used to connect to the Oracle server.
Default: true
Range: true/false
Plugins.Oracle.Sessions.<SessionName>.Password
Specify the named session password for connecting to Oracle.
<SessionName> - define name of a session for using in item keys.
Plugins.Oracle.Sessions.<SessionName>.Service
Specify the named session service name for connecting to Oracle (SID is not supported).
<SessionName> - define name of a session for using in item keys.
Plugins.Oracle.Sessions.<SessionName>.Uri
Specify the named session URI for connecting to Oracle.
<SessionName> - define name of a session for using in item keys.
Embedded credentials will be ignored.
Must match the URI format.
Supported schemes: tcp, tcps
The schema can be omitted.
The port can be omitted (default=1521).
It is also possible to specify the TNS key or TNS value as the connection string. The TNS value must be composed without whitespaces.
Examples:
tcp://127.0.0.1:1521
localhost
zbx_tns_example (TNS key)
(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=xe))) (TNS value)
Plugins.Oracle.Sessions.<SessionName>.User
Specify the named session username for connecting to Oracle.
<SessionName> - define name of a session for using in item keys.
参数
| Parameter | Mandatory | Range | Default | Description |
|---|---|---|---|---|
| Plugins.Oracle.CallTimeout | no | 1-30 | global timeout | 请求完成的最长等待时间(秒)。 |
| Plugins.Oracle.ConnectTimeout | no | 1-30 | global timeout | 建立连接的最长等待时间(秒)。 |
| Plugins.Oracle.CustomQueriesPath | no | Unix 系统为 /usr/local/share/zabbix/custom-queries/oracleWindows 系统为 *:\Program Files\Zabbix Agent 2\Custom Queries\Oracle,其中 * 是 ProgramFiles 环境变量中的驱动器名称 |
包含自定义查询 .sql 文件的目录完整路径。示例: /etc/zabbix/oracle/sql |
|
| Plugins.Oracle.CustomQueriesEnabled | no | false | 如果设置,则启用 oracle.custom.query 监控项键的执行。若禁用,则不会从自定义查询目录路径加载任何查询。 |
|
| Plugins.Oracle.Default.Password | no | 连接 Oracle 的默认密码;如果监控项键或命名会话中未指定值,则使用此密码。 | ||
| Plugins.Oracle.Default.Service | no | 连接 Oracle 的默认服务名(不支持 SID);如果监控项键或命名会话中未指定值,则使用此服务名。 | ||
| Plugins.Oracle.Default.Uri | no | 连接 Oracle 的默认 URI;如果监控项键或命名会话中未指定值,则使用此 URI。 不应包含嵌入式凭据(它们将被忽略)。 必须符合 URI 格式。 仅支持 tcp 和 tcps 方案;方案可以省略。端口可以省略(默认=1521)。 也可以将 TNS 键或 TNS 值指定为连接字符串。TNS 值必须不包含空白字符。 示例: tcp://127.0.0.1:1521localhostzbx_tns_example(TNS 键)(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=xe)))(TNS 值) |
||
| Plugins.Oracle.Default.User | no | 连接 Oracle 的默认用户名;如果监控项键或命名会话中未指定值,则使用此用户名。 | ||
| Plugins.Oracle.KeepAlive | no | 60-900 | 300 | 关闭未使用的插件连接之前的最长等待时间(秒)。 |
| Plugins.Oracle.ResolveTNS | no | true / false | true | 该选项指定如何解释用于连接 Oracle 服务器的连接字符串(ConnString)。 如果设置为 false,则会向 ConnString 添加默认方案和端口(如果缺失)。如果设置为 true,则会省略默认方案和端口(除非在 ConnString 中显式指定),并且 ConnString 将原样传递给 Oracle 客户端。如果 Oracle 客户端在 tnsnames.ora 文件中找到 ConnString,则将使用找到的连接描述来连接 Oracle 服务器。 |
| Plugins.Oracle.Sessions.<SessionName>.Password | no | 命名会话密码。 <SessionName> - 定义一个会话名称,用于监控项键。 |
||
| Plugins.Oracle.Sessions.<SessionName>.Service | no | 命名会话的服务名,用于连接(不支持 SID)。 <SessionName> - 定义一个会话名称,用于监控项键。 |
||
| Plugins.Oracle.Sessions.<SessionName>.Uri | no | Oracle 的命名会话连接字符串。 <SessionName> - 定义一个会话名称,用于监控项键。 不应包含嵌入式凭据(它们将被忽略)。 必须符合 URI 格式。 仅支持 tcp 和 tcps 方案;方案可以省略。端口可以省略(默认=1521)。 也可以将 TNS 键或 TNS 值指定为连接字符串。TNS 值必须不包含空白字符。 示例: tcp://127.0.0.1:1521localhostzbx_tns_example(TNS 键)(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=xe)))(TNS 值) |
||
| Plugins.Oracle.Sessions.<SessionName>.User | no | 命名会话用户名。 <SessionName> - 定义一个会话名称,用于监控项键。 |
另请参见:
- Zabbix agent 2 一般配置参数说明:Zabbix agent 2 (UNIX) / Zabbix agent 2 (Windows)
- 插件 配置说明