Adding New Instance - rbogusze/oracleinfrastructure GitHub Wiki

First let’s add new entry to LDAP. I will use the CLI.

Login as root to logwatch and add an example entry.

# cd /home/oi_ldap/
# ldapadd -x -D "cn=Manager,dc=orainf,dc=com" -W -f example2.ldif
Enter LDAP Password:

Now edit the LDAP entries and find your new one

# ldapvi -D "cn=Manager,dc=orainf,dc=com" --host logwatch --discover

At the end we should see something like:

29 cn=TEST,cn=OracleContext,dc=orainf,dc=com
objectClass: orclService
cn: TEST
orclOracleHome: /TEST/u01/app/oracle/product/10.2
orclNetDescString: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbhost)(PORT=1521))(CONNECT_DATA=(SID=TEST)))
orclVersion: 10.2.0.4
orclSystemName: dbhost
orclSid: TEST

Now the way I usually do it is to replace the TEST with something more meaningful and add some new attributes if I need them. So at the end it looks like:

29 cn=PROD2,cn=OracleContext,dc=orainf,dc=com
objectClass: orclService
orclOracleHome: /TEST/u01/app/oracle/product/10.2
cn: PROD2
orainfDbAlertLogFile: /u01/app/oracle/diag/rdbms/prod/prod2/trace/alert_prod2.log
orainfDbAlertLogMonitoring: TRUE
orainfDbMusasStart: 00:00
orainfDbMusasEnd: 23:00
orainfDbMusasMonitoring: TRUE
orainfDbMusasMonitoringMode: awr
orainfDbRrdoraIndexHash: MjQyNzcK
orainfDbRrdoraUser: scott
orainfOsLogwatchIndexHash: MjE0MzUK
orainfOsLogwatchUser: logwatch
orainfOsLogwatchUserAuth: password
orclNetDescString: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=prd-02)(PORT=1521))(CONNECT_DATA=(SID=PROD2)))
orclSid: PROD2
orclSystemName: prd-02
orclVersion: 11.2.0.4

What the attributes are used for should be rather self explanatory:

Those are used by Oralms to monitor the alertlogs.

orainfDbAlertLogFile: /u01/app/oracle/diag/rdbms/prod/prod2/trace/alert_prod2.log
orainfDbAlertLogMonitoring: TRUE 

This is how to login to the remote host

orainfOsLogwatchIndexHash: MjE0MzUK
orainfOsLogwatchUser: logwatch
orainfOsLogwatchUserAuth: password

Here we set the begin/end time for storing AWR reports that are done by Musas and visualize by Defcon

orainfDbMusasStart: 00:00
orainfDbMusasEnd: 23:00
orainfDbMusasMonitoring: TRUE
orainfDbMusasMonitoringMode: awr

This is how to login to DB to generate AWR

orclNetDescString: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=prd-02)(PORT=1521))(CONNECT_DATA=(SID=PROD2)))
orainfDbRrdoraUser: scott
orainfDbRrdoraIndexHash: MjQyNzcK
⚠️ **GitHub.com Fallback** ⚠️