skip to main content
op5 Oracle Extension : op5 Monitor configuration
   
op5 Monitor configuration
Two methods exist for configuring database access.
Direct database access - This mean all database parameters are configured in the configuration file for the respective module. For MySQL this is the only allowed option.
TNS database access - This move database name, address and port configuration to config file tnsnames.ora. This method is only supported for Oracle databases. To use RAC (Real Application Cluster) this is the only supported method to configure database access. The configuration examples below are based on the example tnsnames.ora file described in section tnsnames.ora
Ninja configuration - The user interface
Copy /opt/monitor/op5/ninja/application/config/database.php to /opt/monitor/op5/ninja/application/config/custom/database.php and edit the destination file.
cp /opt/monitor/op5/ninja/application/config/database.php /opt/monitor/op5/ninja/application/config/custom/database.php
Direct database access
For both the $config['default'] and $config['nacoma'] sections:
set ‘type’ to oracle
set ‘host’ to the address of the oracle server
set ‘port’ to the database port (if different than default)
Depending on oracle configuration you might also need to:
set ‘user’ to the db username (if different than default)
set ‘pass’ to the database password (if different than default)
set ‘database’ to the database name (if different than default)
Example:
$config['default'] = array
(
'benchmark' => TRUE,
'persistent' => FALSE,
'connection' => array
(
'type' => #'pdomysql',
'oracle',
'user' => 'merlin',
'pass' => 'merlin',
# these are only used by the oracle driver
'host' => '172.27.86.215',
'port' => '1521',
'socket' => FALSE,
'database' => 'merlin',
# this is only used by the mysql driver
'dsn' => 'mysql:host=localhost;dbname=merlin'
),
'character_set' => 'latin1',
'table_prefix' => '',
'object' => TRUE,
'cache' => FALSE,
'escape' => TRUE
);
 
$config['nacoma'] = array
(
'benchmark' => TRUE,
'persistent' => FALSE,
'connection' => array
(
'type' => #'pdomysql',
'oracle',
# these are only used by oracle
'user' => 'nacoma',
 
'pass' => 'nacoma',
'host' => '172.27.86.215',
'port' => '1521',
'socket' => FALSE,
'database' => 'nacoma',
# this is only used by pdomysql
'dsn' => 'mysql:host=localhost;dbname=nacoma'
),
'character_set' => 'latin1',
'table_prefix' => '',
'object' => TRUE,
'cache' => FALSE,
'escape' => TRUE
);
 
TNS database access - for RAC setups
For both the $config['default'] and $config['nacoma'] sections:
set ‘type’ to oracle
set ‘conn_str’ to the identifier in configuration file tnsnames.ora
Depending on oracle configuration you might also need to:
set ‘user’ to the db username (if different than default)
set ‘pass’ to the database password (if different than default)
Example:
$config['default'] = array
(
'benchmark' => TRUE,
'persistent' => FALSE,
'connection' => array
(
'type' => #'pdomysql',
'oracle',
'user' => 'merlin',
'pass' => 'merlin',
# these are only used by the oracle driver
'host' => '172.27.86.215',
'port' => '1521',
'socket' => FALSE,
'database' => 'merlin',
'conn_str' => 'merlindbs',
),
'character_set' => 'latin1',
'table_prefix' => '',
'object' => TRUE,
'cache' => FALSE,
'escape' => TRUE
);
 
$config['nacoma'] = array
(
'benchmark' => TRUE,
'persistent' => FALSE,
'connection' => array
(
'type' => #'pdomysql',
'oracle',
# these are only used by oracle
'user' => 'nacoma',
 
'pass' => 'nacoma',
'host' => '172.27.86.215',
'port' => '1521',
'socket' => FALSE,
'database' => 'nacoma',
'conn_str' => 'nacomadbs',
 
),
'character_set' => 'latin1',
'table_prefix' => '',
'object' => TRUE,
'cache' => FALSE,
'escape' => TRUE
);
Nagvis configuration - The visualization and map tool
Direct database setup
Edit /opt/monitor/op5/nagvis/etc/nagvis.ini.php
In the [defaults] section
set backend="merlinoci_1"
In the [backend_merlinoci_1]
set dbhost to the oracle server adress
Depending on oracle configuration you might also need to:
set ‘dbuser’ to the db username
set ‘dbpass’ to the database password
set ‘dbname’ to the database name set ‘dbport’ to the database port
Example:
[defaults]
; default backend (id of the default backend)
backend="merlinoci_1"
[backend_merlinoci_1]
; type of backend - MUST be set
backendtype="merlinoci"
; hostname for Merlin db
dbhost="172.27.86.215"
; database name for Merlin db
dbname="merlin"
; username for Merlin db
dbuser="merlin"
; password for Merlin db
dbpass="merlin"
; portname for Merlin db
dbport=1521
 
TNS database setup - for RAC setups
Edit /opt/monitor/op5/nagvis/etc/nagvis.ini.php
In the [defaults] section
set backend="merlinoci_1"
In the [backend_merlinoci_1]
set dbconnstr to the merlin database identifier from configuration file “tnsnames.ora ”
Depending on oracle configuration you might also need to:
set ‘dbuser’ to the db username
set ‘dbpass’ to the database password
Example:
[defaults]
; default backend (id of the default backend)
backend="merlinoci_1"
[backend_merlinoci_1]
; type of backend - MUST be set
backendtype="merlinoci"
; username for Merlin db
dbuser="merlin"
; password for Merlin db
dbpass="merlin"
; override the configuration above with a custom connection description
dbconnstr="merlindbs"
 
NOTE 1: There should not be any blank lines with in a section in the configuration above. A section start with a identifier enclosed in square brackets ([backend_merlinoci_1] in the example above.
NOTE 2: The Geomap only works when using https.
Merlin configuration – The backend data collector
Direct database access
To configure merlin you first need to edit /opt/monitor/op5/merlin/merlin.conf. In the database {} section set host and type. Depending on your oracle install name (database name), user and password might also need to be edited.
By default merlin uses ‘auto_commit’ meaning every statement is commited. This will impact performance in large environments. To enable bulk operation you use the parameters commit_interval and commit_queries.
Enabling these as in the example below mean we commit when we have 2000 queries or when 3 seconds have elapsed, which ever come first. If the database server is heavily loaded it might be beneficial to decrease the number of queries in each operation, commit_interval=1 and commit_queries=500 could be a suitable setting in such cases.
database {
name = merlin;
user = merlin;
pass = merlin;
host = 172.27.86.215;
type = oracle;
port = 1521;
commit_interval = 3;
commit_queries = 2000;
}
Secondly you need to edit the config options in the top of /opt/monitor/op5/merlin/import.php
Example:
$imp->db_type = 'oracle';
$imp->db_host = '172.27.86.215';
$imp->db_user = 'merlin';
$imp->db_pass = 'merlin';
$imp->db_database = 'merlin';
$imp->db_port = '1521';
TNS database access - for RAC setups
To configure merlin you first need to edit /opt/monitor/op5/merlin/merlin.conf. In the database {} section set conn_str to the merlin identifier from configuration file tnsnames.ora
Depending on your oracle install user and password might also need to be edited. By default merlin uses ‘auto_commit’ meaning every statement is commited. This will impact performance in large environments. To enable bulk operation you use the parameters commit_interval and commit_queries. Enabling these as in the example below mean we commit when we have 2000 queries or when 3 seconds have elapsed, which ever come first.
NOTE: host and port should not be defined when using tns access.
database {
user = merlin;
pass = merlin;
type = oracle;
commit_interval = 3;
commit_queries = 2000;
conn_str = ‘merlindbs’;
}
Secondly you need to edit the config options in the top of /opt/monitor/op5/merlin/import.php
Example:
$imp->db_type = 'oracle';
$imp->db_user = 'merlin';
$imp->db_pass = 'merlin';
$imp->db_conn_str = 'merlindbs';
Config verification
Verify import functionality by executing
On Solaris:
/opt/csw/php5/bin/php /opt/monitor/op5/merlin//import.php
Successful import should produce output similar to:
Disabling indexes
Importing objects to database merlin
importing objects from /opt/monitor/var/objects.cache
importing status from /opt/monitor/var/status.log
Enabling indexes
Nacoma configuration – The configuration tool
Direct database access
To configure Nacoma (the object configuration tool) you edit /opt/monitor/op5/nacoma/include/db_config.inc.php
Example:
$db_type = 'oracle'; // mysql or oracle
$db_host = '172.27.86.215';
$db_user = 'nacoma';
$db_passwd = 'nacoma';
$db_database = 'nacoma';
$db_port = 1521;
TNS database access - for RAC setups
To configure Nacoma (the object configuration tool) you edit /opt/monitor/op5/nacoma/include/db_config.inc.php
Example:
$db_type = 'oracle'; // mysql or oracle
$db_user = 'nacoma';
$db_passwd = 'nacoma';
$db_conn_str = 'nacomadbs';
TNS - the tnsnames.ora configration file
On Redhat/CentOS the tnsnames.ora file should be placed in the /etc/ directory
On Solaris the tnsnames.ora file should be placed in the /var/opt/oracle/ directory
 
The configuration examples above is based on the following tnsnames.ora example:
nacomadbs=
(DESCRIPTION=
(ADDRESS_LIST=
(FAILOVER=on)
(LOAD_BALANCE=off)
(ADDRESS=(PROTOCOL=tcp)(HOST=172.27.86.215)(PORT=1521))
(ADDRESS=(PROTOCOL=tcp)(HOST=172.27.86.219)(PORT=1521)))
(CONNECT_DATA=(SERVICE_NAME=nacoma)))
merlindbs=
(DESCRIPTION=
(ADDRESS_LIST=
(FAILOVER=on)
(LOAD_BALANCE=off)
(ADDRESS=(PROTOCOL=tcp)(HOST=172.27.86.215)(PORT=1521))
(ADDRESS=(PROTOCOL=tcp)(HOST=172.27.86.219)(PORT=1521)))
(CONNECT_DATA=(SERVICE_NAME=merlin)))