Skip to main content

Goldengate Enabling Monitoring using Jagent in OEM

Golden Gate : Enabling Monitoring using JAGENT (Java Agent) in OEM

How to install & configure the Java Agent (JAGENT) for Golden Gate monitoring

Step 1: Make sure to install 1.8 or higher version JDK
/ogg_fs/java/jdk1.8.0_231/bin
Example:
Extract this file to install java version : jdk-8u231-linux-x64.tar.gz
Tar –zxvf jdk-8u231-linux-x64.tar.gz /ogg_fs/java/

Step 2: Set the JAVA environment to installed version as above
Export JAVA_HOME=/ogg_fs/java/jdk1.8.0_231
Export PATH=$JAVA_HOME/bin:$PATH
Step 3: Download and extract Golden Gate Jagent software
Cd /ogg_fs/ogg_sw
-rw-r--r-- 1 oracle oinstall      8986 Oct 11  2016 fmw_12212_readme.htm
-r-xr-xr-x 1 oracle oinstall 446021430 Oct 11  2016 fmw_12.2.1.2.0_ogg.jar

Step 4: Create response file as below

Vi jagent_install.rsp
########################################################################
[ENGINE]

#DO NOT CHANGE THIS.
Response File Version=1.0.0.0.0

[GENERIC]

#Set this to true if you wish to skip software updates
DECLINE_AUTO_UPDATES=true

#My Oracle Support User Name
MOS_USERNAME=

#My Oracle Support Password
MOS_PASSWORD=<SECURE VALUE>

#If the Software updates are already downloaded and available on your local system, then specify the path to the directory where these patches are available and set SPECIFY_DOWNLOAD_LOCATION to true
AUTO_UPDATES_LOCATION=

#Proxy Server Name to connect to My Oracle Support
SOFTWARE_UPDATES_PROXY_SERVER=

#Proxy Server Port
SOFTWARE_UPDATES_PROXY_PORT=

#Proxy Server Username
SOFTWARE_UPDATES_PROXY_USER=

#Proxy Server Password
SOFTWARE_UPDATES_PROXY_PASSWORD=<SECURE VALUE>

#The oracle home location. This can be an existing Oracle Home or a new Oracle Home
ORACLE_HOME=/ogg_fs/app/product/goldengate/jagent

#Set this variable value to the Installation Type selected. e.g. Complete, GoldenGate Veridata Web Server Installation, GoldenGate Veridata Agent Installation, GoldenGate Veridata Web Server and Agent Installation, GoldenGate Monitor Web Server Installation, GoldenGate Monitor Agent Installation, GoldenGate Monitor Web Server and Agent Installation.
INSTALL_TYPE=GoldenGate Monitor Agent Installation
####################################################################################

Step 5: create installation directories
Mkdir –p  /ogg_fs/app/product/goldengate/jagent
Mkdir –p /ogg_fs/app/product/goldengate/agent_inst/gg_home1

Step 6: Install jagent software in silent mode

java -jar <full_path>/fmw_12.1.3.0.0_ogg.jar -silent -responseFile [full_path]/monitoragent.rsp

example:

java -jar fmw_12.2.1.2.0_ogg.jar -silent -responseFile /ogg_fs/ogg_sw/jagent_install.rsp
Launcher log file is /tmp/OraInstall2019-12-31_01-48-00PM/launcher2019-12-31_01-48-00PM.log.
Extracting the installer . . . . . . . . . Done
Checking if CPU speed is above 300 MHz.   Actual 2699.945 MHz    Passed
Checking swap space: must be greater than 512 MB.   Actual 16383 MB    Passed
Checking if this platform requires a 64-bit JVM.   Actual 64    Passed (64-bit not required)
Checking temp space: must be greater than 300 MB.   Actual 24485 MB    Passed


Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2019-12-31_01-48-00PM
Log: /tmp/OraInstall2019-12-31_01-48-00PM/install2019-12-31_01-48-00PM.log
Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
Reading response file..
Skipping Software Updates
Starting check : CertifiedVersions
Expected result: One of oracle-6,oracle-7,redhat-7,redhat-6,SuSE-11,SuSE-12
Actual Result: redhat-7.6
Check complete. The overall result of this check is: Passed
CertifiedVersions Check: Success.


Starting check : CheckJDKVersion
Expected result: 1.8.0_101
Actual Result: 1.8.0_231
Check complete. The overall result of this check is: Passed
CheckJDKVersion Check: Success.


Validations are enabled for this session.
Verifying data
Copying Files
Percent Complete : 10
Percent Complete : 20
Percent Complete : 30
Percent Complete : 40
Percent Complete : 50
Percent Complete : 60
Percent Complete : 70
Percent Complete : 80
Percent Complete : 90
Percent Complete : 100

The installation of Oracle Fusion Middleware 12c GoldenGate Monitor & Veridata 12.2.1.2.0 completed successfully.
Logs successfully copied to /u01/app/oraInventory/logs.

Creating Oracle Golden Gate Monitoring Agent instance

Step 1:  Run the createmonitoragentinstance.sh script
Cd /ogg_fs/app/product/goldengate/jagent/oggmon/ogg_agent

./createMonitorAgentInstance.sh
Please enter absolute path of Oracle GoldenGate home directory : /ogg_fs/app/product/goldengate/gg_home1
Please enter absolute path of OGG Agent instance : /ogg_fs/app/product/goldengate/agent_inst/gg_home1
Please enter unique name to replace timestamp in startMonitorAgent script (startMonitorAgentInstance_20191231135757.sh) : gg_home1
Successfully created OGG Agent instance.

Configuring Oracle Golden Gate Monitoring Agent instance

Step1: Edit config.properties file

Cd /ogg_fs/app/product/goldengate/agent_inst/gg_home1/
vi ./cfg/Config.properties

Modify below values to in configuration file

jagent.host=<hostname>
agent.type.enabled=OEM

Step 2: Create wallet credentials

Rename the existing wallet directory
Cd /ogg_fs/app/product/goldengate/agent_inst/gg_home1
mv dirwlt dirwlt_orig

cd bin
./pw_agent_util.sh -jagentonly
Please create a password for Java Agent:
Please confirm password for Java Agent:
Dec 31, 2019 2:03:31 PM oracle.security.jps.JpsStartup start
INFO: Jps initializing.
Dec 31, 2019 2:03:31 PM oracle.security.jps.JpsStartup start
INFO: Jps started.
Wallet is created successfully.

Prepare the Oracle Golden Gate Monitor Agent instance for Monitoring

Step 1: Go to Golden Gate Home
Cd /ogg_fs/app/product/goldengate/gg_home1
Add the below line to GLOBALS file
ENABLEMONITORING

Step 2: Modify the Jagent Param file as below
Cd <GGhome>/dirprm
Vi jagent.prm

From :
COMMAND java -Dconfig.dir=/ogg_fs/app/product/goldengate/agent_inst/gg_home1/cfg -Djava.util.logging.config.class=oracle.core.ojdl.logging.LoggingConfiguration -Doracle.core.ojdl.logging.config.file=/ogg_fs/app/product/goldengate/agent_inst/gg_home1/cfg/logging-config.xml -Doracle.core.ojdl.logging.componentId=JAGENT -jar -Xms512m -Xmx1024m /ogg_fs/app/product/goldengate/jagent/oggmon/ogg_agent/dirjar/jagent.jar

To:
COMMAND /ogg_fs/java/jdk1.8.0_231/bin/java -Dconfig.dir=/ogg_fs/app/product/goldengate/agent_inst/gg_home1/cfg -Djava.util.logging.config.class=oracle.core.ojdl.logging.LoggingConfiguration -Doracle.core.ojdl.logging.config.file=/ogg_fs/app/product/goldengate/agent_inst/gg_home1/cfg/logging-config.xml -Doracle.core.ojdl.logging.componentId=JAGENT -jar -Xms512m -Xmx1024m /ogg_fs/app/product/goldengate/jagent/oggmon/ogg_agent/dirjar/jagent.jar


Step 3: Follow the same sequence to start the Jagent

1.       Stop all replicators, extracts
2.       Stop manager
3.       Start PMSRVR
4.       Start Mgr
5.       Start all replicators, extracts
6.       Start Jagent


Final Step: Using username configured in Config.Properties file and password generated using pw_agent_util.sh -jagentonly and port (default 5559) can configure monitoring in OEM.



Comments

  1. Followd your steps brother and could able to configure JAGENT ( For the fist time ever :) )

    GGSCI (GGCORE1.US.ORACLE.COM) 18> info all

    Program Status Group Lag at Chkpt Time Since Chkpt

    MANAGER RUNNING
    JAGENT RUNNING
    PMSRVR RUNNING



    BUt i have doubt brother, what is the use of the below paths
    Step 5: create installation directories
    Mkdir –p /ogg_fs/app/product/goldengate/jagent
    Mkdir –p /ogg_fs/app/product/goldengate/agent_inst/gg_home1

    ReplyDelete
    Replies
    1. It holds the Jagent software home. If you are aware of OEM Agent binaries installation, there will be two locations one is to hold binaries and another is for using the utility to start/stop the process.

      Delete
  2. I had issues automating monitoring agent instance, following sample helped to fix this problem!


    [void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
    Start-Process -FilePath C:\oracle\gg12c\agent\oggmon\ogg_agent\createMonitorAgentInstance.bat

    # Wait the application start for 3 sec
    Start-Sleep -m 3000

    # Send keys
    [System.Windows.Forms.SendKeys]::SendWait("C:\Goldengate")
    [System.Windows.Forms.SendKeys]::SendWait("{ENTER}")
    Start-Sleep -m 3000


    [System.Windows.Forms.SendKeys]::SendWait("C:\gg12c\myagentinstancefolder")
    [System.Windows.Forms.SendKeys]::SendWait("{ENTER}")
    Start-Sleep -m 3000

    [System.Windows.Forms.SendKeys]::SendWait("startMonitorAgentInstance_202110081324.bat")
    [System.Windows.Forms.SendKeys]::SendWait("{ENTER}")
    Start-Sleep -m 5000

    ReplyDelete
  3. Hi, Could you please help me out with this: How to find pmsrvr.log file in goldengate? The process is running but I'm not able to find the log file.

    ReplyDelete
    Replies
    1. It will be available in GoldenGate installation home directory.

      Delete

Post a Comment

Popular posts from this blog

How to unmount and mount ACFS FILESYSTEM

How to unmount and mount ACFS FileSystem in Linux Unmounting ACFS File Systems ACFS file systems can be used by Oracle RAC for hosting software files for the database. It can also be used as a general purpose file system for non-database files. The ACFS file system is managed and administered by the Oracle Grid Infrastructure, So ACFS file systems will be impacted when shutting down the GI stack for patching GI homes. Shut down the processes (including non-Oracle processes) that use the files on ACFS, then unmount the ACFS file system. If the ACFS file system is used by Oracle database software, then perform Steps 1 and 2. 1.      Execute the following command to find the names of the CRS managed ACFS file system resource.  # crsctl stat res -w "TYPE = ora.acfs.type" -p | grep VOLUME 2.      Execute the following command to stop the CRS managed ACFS file system resource with the resource name found from Step 1. ...

How to perform GRID/RDBMS patching of DB systems deployed in OCI using dbcli command line utility

This procedure covers OS, Grid and RDBMS home patching for Oracle Cloud Infrastructure (OCI) DB systems using the dbcli utility. Run every step as root . Advantages of dbcli patching Simple command line, with no manual patch download or copy to the nodes. Patches are downloaded automatically if the service gateway can reach Oracle Object Storage and the YUM repos. Applied in a rolling fashion, so no downtime is needed. Disadvantages You can't choose the patch version; the latest available in OCI is applied. Rollback isn't possible from the console, and dbcli support is limited (see the note at the end). Steps 1. Backup Make sure a recent full backup exists before patching. 2. Blackout Create a blackout for both nodes (console or emctl ) to avoid unnecessary alerts. 3. Check patch availability # dbcli describe-component 4. Pre-checks Grid home: # dbcli update-server -p # dbcli describe-job -i <jobId> RDBMS home: # dbcli list-dbhomes...

To fix huge lag between primary and DR using 12c feature: 12c Recover from service

Scope If transport or apply lag is huge difference, then we can fix using 12c new feature “Recover from Service”. Prerequisites : Oracle Net connectivity is established between the physical standby database and the primary database. You can do this by adding an entry corresponding to the primary database in the tnsnames.ora file of the physical standby database. The password files on the primary database and the physical standby database are the same. The COMPATIBLE parameter in the initialization parameter file of the primary database and physical standby database is set to 12.0 or higher. Start RMAN and connect as target to the physical standby database. Detailed Steps: Step 1: Stop the MRP process in standby database. If dg broker: Edit database <dbname> set state=’APPLY-OFF’; Step 2:   Shut down the standby database and mount the same. Shut immediate;   (srvctl stop database –d <dbname>)  ...