I already wrote about configuring GoldenGate agent for ODI and Enterprise Manager. Now I would like to talk about configuring it for GoldenGate Monitor. GoldenGate is interesting tool for GoldenGate monitoring. It is more powerful and flexible than GoldenGate plugin for Enterprise Manager but it is still standalone tool not integrated with OEM. So it has its own advantages and disadvantages.
From the technical standpoint configuring GoldenGate Agent for Monitor is a little bit different than configuring GoldenGate Agent for OEM and ODI. Also I see some inaccuracies in documentation and step-by-step configuration is not crystal clear. That’s why I writing this blog post – I would like to have short step-by-step instruction how to configure GoldenGate Agent for Monitor.
So let’s look at GoldenGate monitoring framework architecture
We can see
- GoldenGate Monitor has its own Server with Repository (which is Oracle Database)
- Each GoldenGate instance has Agent (Monitor Agent)
- Monitor Server and Monitor agents communicates through JMX (which can also be encrypted by SSL)
- Agent communicates with Manager to get information about GoldenGate state
Everything look like OEM and GoldenGate communication but there is difference: there are no additional OEM Agent which mediator between GoldenGate Agent and OEM. Absence of this mediator has good effect on latency of monitoring.
Installing GoldenGate Monitor 12.2
Let’s start installation. GoldenGate Monitor 12.2 installation is simple enough. It’s very similar to other Fusion Middleware products installation.
Install JDK 1.8.45+
GoldenGate Monitor 12.2 and GoldenGate Agent 12.2 are certified with Oracle JDK 1.8.45+. Don’t believe documentation: it has some ambiguity regarding JDK version.
Install Oracle Application Development Framework
GoldenGate Monitor 12.2 uses Oracle Application Development Framework (AKA Oracle Fusion Middleware Infrastructure). We can find it inside Oracle Weblogic Suite 18.104.22.168.0 media
- Start installation after downloading
[oracle@demolab1 fmw122]$ java -jar fmw_22.214.171.124.0_infrastructure.jar
- Set patch for GoldenGate Monitor home
- Agree to not install Examples and other defaults values for other parameters
Install GoldenGate Monitor 12.2
- Download GoldenGate Monitor from edelivery.oracle.com
- Start installation after downloading
java -jar fmw_126.96.36.199.0_ogg.jar
- Set the destination path to the directory where Infrastructure was installed
- Choose installation type (I chose Complete Install)
- Check final summary of installation and press Install
Configure GoldenGate Monitor Domain
1. Run RCU to configure
2. Choose Create repository->System Load and Product Load to interactively create tablespaces and schemas for GoldenGate Monitor
3. Configure connection to Oracle Database
4. Choose Oracle GoldenGate Monitor Server for schema installation
5. Check parameters and start installation
6. After creating schemas for GoldenGate Monitor we should start configuring domain
7. Choose Domain Name (any name) and replace base_domain directory with you_name_domain directory
8. On the second page of wizard choose component you plan to install (Oracle GoldenGate Monitor Server). Wizard automatically will choose all required components like Oracle JRF. Then choose next.
9. On the step 3 enter weblogic user password.
13. On the Step 8 you will need to enter some usernames and password to store inside Wallet. Really you will regenerate them later but let’s enter correct parameters.
14. Usually I use only one Administration Server for Monitor and Veridata deployment. So Let’s choose option “Managed Servers, Clusters and Coherence” on Step 9. It will allow use to remove managed servers later.
17. Let’s start GoldenGate Monitor
18. Let’s create user for GoldenGate Monitor. You can do it in Weblogic console http://gg1:7001/console
21. Then login to http://gg1:7001/monitor using created credentials. You will see empty GoldenGate Monitor. Information will be pushed to GoldenGate Monitor by agents who directly communicated to GoldenGate.
22. Last and very important step. We will update GoldenGate Monitor configuration. This update will initiate special configuration file (oggmon.properties) creation.
23. Enter required information
24. You can find created oggmon.properties in directory /u01/app/oracle/product/Middleware122/monitor_home/user_projects/domains/monitor_domain/config/monitorserver/cfg
It will contain only one very important parameter
25. Let’s save this parameter file. We will copy it to every GoldenGate Agent home.
cp /u01/app/oracle/product/Middleware122/monitor_home/user_projects/domains/monitor_domain/config/monitorserver/cfg/oggmon.properties /home/oracle
Installing GoldenGate Agents 12.2
We install GoldenGate Agent in two steps: base deployment and instance deployment. Base deployment contains all software. Instance deployment is just directory which contains configuration files. You will have one base deployment and multiple instance deployments on each server.
GoldenGate Agents should be installed on each server with GoldenGate to discover GoldenGate processes.
1. We will install GoldenGate Agent using same archive (fmw_188.8.131.52.0_ogg.jar) which was used for GoldenGate Monitor installation. Let’s start installation
java -jar fmw_184.108.40.206.0_ogg.jar
2. Now we will choose another directory for GoldenGate Agent installation. This directory should be empty (it shouldn’t contain Application Development Framework). I will use directory the following directory:
3. Choose Oracle GoldenGate Monitor Agent in Installation Type dialog:
4. Continue and agree to default options.
We do instance deployment using special script files placed in $BASE_DEPLOYMENT_HOME/oggmon/ogg_agent. Let’s create instance.
1. Create directory for GoldenGate Agent instance
2. Install instance
3. Enter path to monitored GoldenGate, path for GoldenGate Agent instance and unique script name for GoldenGate Agent starting
4. Now we will change GoldenGate Agent parameters. You can find GoldenGate Agent parameters in file $INSTANCE_HOME/cfg/Config.properties. Key parameters for GoldenGate Agent configured to work in conjunction with GoldenGate Monitor:
|monitor.host||gg1||Hostname of GoldenGate Monitor Host|
|monitor.jmx.port||5502||GoldenGate Monitor port. By default its values is 5502|
|monitor.jmx.username||oggmsjmxusr||Username which is used to establish secure communication with GoldenGate Monitor|
|agent.type.enabled||OGGMON||You should set it to OGGMON to switch Agent to GoldenGate Monitor mode|
|jagent.ssl||false||By default ssl communications are turned off on GoldenGate Monitor Server side. So we turn off it on agent side|
|jagent.host||gg1||This is the name which will be used in GoldenGate Monitor diagrams. So it would be great to give meaningful name|
5. Copy save ogg.properties file to $INSTANCE_HOME/cfg
cp /home/oracle/oggmon.properties $INSTANCE_HOME/cfg
6. Then create wallet which will contain password for oggmsjmxusr
rm ../dirwlt/ -rf
6. Enable monitoring in GoldenGate. To do this create file $GOLDENGATE_HOME/GLOBALS and add one line
7. So we just configured GoldenGate Agent. Let’s start it.
8. Now jagent is running. It’s make sense to look into log files:
tail -f $INSTANCE_HOME/logs/ogg_agent.log
To discover all GoldenGate processes we will need to install GoldenGate Agent for every host.
What do we have now?
After running all GoldenGate agent we will have full picture of replication. You can see GoldenGate processes with break down by hostnames.
Also if you’ve added full GoldenGate path from source database to target database then you will see Solution. Solution will be built for you automatically. It will include all processes, databases, trails participating in replication. You can open solution and see something like
Troubleshooting (thanks to Andrew)
If you got error “Exception in thread “agentRegistration” com.goldengate.monitor.MonitorRuntimeException: Could not get ggs_version from Agent’s mbean” or other errors in jagent logs (<AGENT_HOME>/logs) then you can try to recreate GoldenGate Datastore:
GoldenGate Monitor is interesting and powerful enough tool for GoldenGate monitoring. You can use it to quickly configure monitoring. It is much easier to configure it than Enterprise Manager.