Skip to main content

Parameters and configuration

Parameters

--conf Path to the configuration file.
--target_databases Path to the configuration file containing the database targets.
--target_agents Path to the configuration file containing the agent targets.
--custom_queries Path to the configuration file containing custom queries.


Configuration file (--conf)

[CONF]
agents_group_id: < The ID of the group where agents will be created. >
interval: < The agent monitoring interval in seconds. >
user: < The connection username. >
password: < The password for the user. >
threads: < The number of threads to be used for agent creation. >
modules_prefix: < The prefix for module names. >
execute_custom_queries: < Activate with 1 to enable the use of custom queries. >
analyze_connections: < Activate with 1 to enable connection monitoring. >
engine_uptime: < Activate with 1 to enable runtime monitoring. >
query_stats: < Activate with 1 to enable query statistics monitoring. >
check_tablespaces: < Activate with 1 to enable tablespace statistics monitoring. >
fragmentation_ratio: < Activate with 1 to enable fragmentation ratio statistics monitoring. >
cache_stats: < Activate with 1 to enable cache statistics monitoring. >
thick_mode = < Activate with 1 to enable thick mode connection >
multitenant = < Enable with 1 to enable multi-tenant monitoring. Only applicable to Oracle multi-tenant architectures (CDB/PDB); in non-CDB environments, it will simply issue a harmless warning >
agent_per_pdb = <Enable with 1 to enable agent creation for each PDB. Applicable only to Oracle multitenant (CDB/PDB) architectures. If this box is checked, an agent will be created for each PDB in the instance; otherwise, the modules for each PDB will be included in the instance's primary agent. >
client_path = < Client path. Only necessary in case of using the thick mode >
entities_list = < Path where the entity file will be generated>
enable_entities_interval = < Path to activate the entity file (multitenant mode only)>
entities_interval = < entity file rescan interval>

[THRESHOLDS]
< Regex pattern matching module names > = < Desired thresholds in the module, separated by “|” >

Example

[CONF]
agents_group_id = 10
interval = 300
user = sa 
password = HHgD85V@
threads = 1
modules_prefix = 
execute_custom_queries = 1
analyze_connections = 1
engine_uptime = 1
query_stats = 1
check_tablespaces = 1
fragmentation_ratio = 1
cache_stats = 1
thick_mode = 1
multitenant = 0
agent_per_pdb = 0
client_path = /usr/lib/oracle/21/client64/lib/
entities_list = /tmp/entities_oracle.txt
enable_entities_interval = 1
entities_interval = 48000

[THRESHOLDS]
^tablespace = min_warning 10|max_warning 20|min_critical 0|max_critical 10
fragmentation = min_warning 10

The standard installation of instant client 19.8 is done in the /usr/lib/oracle/19.8/client64/lib path.

List of target databases (--target_databases):

The content of the file should be a list of target databases, with each database separated by commas or lines. The format for a database can be any of the following:

ip/sid
ip:puerto/sid 
ip:puerto/service_name

If the port is not specified, the default TCP port 1521 will be used for connecting to the target.

Example:

172.17.0.3:1521/FREEPDB1

Each line in the file should represent a separate target database using one of these formats. This file is used to specify the databases that the plugin should monitor.

You can also specify a DNS string directly.

Standalone server example:

dsn=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=sales1-srv)(PORT=1521))(CONNECT_DATA=(SID=ORCL)))

Failover example with two servers

dsn=(DESCRIPTION=(FAILOVER=ON)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=sales1-srv)(PORT=1521) (CONNECT_TIMEOUT=5)(RETRY_COUNT=2))(ADDRESS=(PROTOCOL=TCP)(HOST=sales2-srv)(PORT=1521)(CONNECT_TIMEOUT=5)(RETRY_COUNT=2)))(CONNECT_DATA=(SID=ORCL)))

List of target agents (--target_agents):

The content of the file should be a list of agent names, with each agent separated by commas or lines. These agent names will be used to associate the information from each target database with the corresponding specified agent name, instead of letting the plugin generate agent names automatically.

The position of each agent name in the list should match the position of the target database in its own list. In other words, the name for the first target database should be the first name in this list, considering that blank lines are ignored.

Example:

agente1,,agente3
agente4
agente5,agente6,agente7,,agente9

Custom queries (--custom_queries)

A module must be introduced for each custom query that is intended to be monitored. The modules must follow a structure, which is as follows:

check_begin      --> Module opening label
name             --> Module name
description      --> Description of the module.
operation        --> Operation type
datatype         --> Module type
min_warning      --> Configuration of the minimum warning threshold
max_warning      --> Configuration of the maximum warning threshold
str_warning      --> Warning string configuration
warning_inverse  --> Activate the inverse interval with 1 for warning threshold
min_critical     --> Setting the minimum critical threshold
max_critical     --> Setting the maximum critical threshold
str_critical     --> Critical string configuration
critical_inverse --> Activate inverse interval with 1 for critical threshold
module_interval  --> This interval is calculated as a multiplier of the agent interval.
target           --> Custom query
target_scope     --> execution scope: cdb, pdb or all (default: cdb).
#                     - cdb: only on the CDB instance
#                     - pdb: only on each discovered PDB (requires multitenant=1)
#                     - all: on both (CDB and PDBs)
target_databases --> Database agents in which the module will be created
check_end        --> Module closing tag

Example:

check_begin
name Select 1
description Number of invalid objects
operation value
datatype generic_data
min_warning 5
target SELECT 1 FROM dual
target_databases all
check_end

check_begin
name NumeroConexiones
description Number of connections
operation value
datatype generic_data
min_warning 5
target SELECT COUNT(*) AS NumeroConexiones FROM v$session;
target_databases pandora
check_end

check_begin
name NumeroRegistros.files_table
description Invalid objects (detail)
operation full
datatype generic_data
target SELECT COUNT(*) AS NumeroRegistros FROM files;
target_databases pandora
check_end