How to Point an Agent to a different Grid Control OMS and Repository?

1 08 2008
Subject: How to Point an Agent to a different Grid Control OMS and Repository?
Doc ID: Note:413228.1 Type: HOWTO
Last Revision Date: 25-FEB-2008 Status: PUBLISHED
In this Document
Goal
Solution


Applies to:

Enterprise Manager Grid Control – Version: 10.2.0.0
Information in this document applies to any platform.

Goal

This Note intends to explain how to point an Oracle Management Agent to a different Grid Control OMS and Repository?

NOTE: These steps are NOT necessary if you are simply pointing the Oracle Management Agent to a new OMS that points to the SAME repository.  If simply moving from one OMS to another within the same Grid infrastructure, follow the instructions in the Documentation, Oracle® Enterprise Manager Advanced Configuration, Chapter 12 Reconfiguring the Management Agent and Management Service, 12.1.1 Configuring the Management Agent to Use a New Management Service

Solution

A. Drop the Agent from the current OMS

Note: this assumes that the Agent is still pointing to the old OMS. You will first drop the Agent from the old OMS, then add it to the new OMS. This can be ignored if the OMS doesn’t exist anymore.

1. Leave the monitoring agent up and running in order to delete all the targets, except the host and the agent itself).

2. From the old OMS, drop all the Targets on the host to be removed, except the Host and Agent.

Do not remove Host yet, but to confirm all targets are gone, choose Targets > Hosts, highlight the host in the list and hit “Remove” button. Grid will not allow the Host to be dropped until all targets on the Host are gone, so this will list any remaining targets. Again: Do not remove Host yet.

All targets except the Host and Agent should now be gone from the OMS.

3. Confirm the targets (except Host and Agent) are removed successfully and completely from the OMS:

Click on “Setup” in upper right.
Click on the “EM 10g Grid Control Management System” tab

You will see this information on the page:

–> Management Services and Repository
–> Overview page
–> General section
–> Deleted Targets: < click on the digit listed here >

3a. Click on “Deleted Targets” (Note this only appears once a delete is attempted.)

3b. Confirm that the “Time Delete Completed” column is filled in; once that column is filled in then the delete is complete.

4. Stop the monitoring Agent

5. Drop the Host target from the old OMS.
Targets > Hosts, highlight the host in the list and hit “Remove” button.

Monitor for the “Time Delete Completed” column.
Proceed once the column is updated.

6. Drop the Agent target from the old OMS.

Targets > All Targets > [pick Agent from list] > “Remove” button.

Monitor for the “Time Delete Completed” column.
Proceed once the column is updated.

–> At this point the removal from the old OMS is completed.

B. Point the Agent at the new OMS

7. Follow the steps to reconfigure the Agent to point to the new OMS.

Here is the Documentation reference, which does explain several steps in a clear manner and will help clarify the process needed.

Oracle® Enterprise Manager Advanced Configuration, Chapter 12 Reconfiguring the Management Agent and Management Service, 12.1.1 Configuring the Management Agent to Use a New Management Service

Quick Summary of steps to point Agent at new OMS

To associate the Management Agent with a new Management Service after you have installed the Management Agent:

#1 Stop the agent

#2 Edit the Agent’s $ORACLE_HOME/sysman/config/emd.properties file

#3 Search for REPOSITORY_URL
Change this to point to the non-secure Grid Control hostname and port
*also change HTTPS://….. to HTTP (non-secure.)

#4 Search for EMD_URL
This is your Agent’s address – if it has HTTPS, change it to HTTP

#5 Modify the value for the emdWalletSrcUrl and emdWalletDest properties. The emdWalletSrcUrl references the new Management Service. The emdWalletDest is the location where the agent saves the wallet received from the OMS, in its own file system. This is normally a directory on the agent node.

For example, if the new Management Service is on a host called mgmthost2.acme.com, modify the properties as follows:
emdWalletSrcUrl=http://mgmthost2.acme.com:4889/em/wallets/emd
emdWalletDest=<AGENT_HOME>/sysman/config/server

#6 Save and exit emd.properties.

Disclaimer: Clean starting the agent is only to be performed in this specific scenario and should only be used for all other issues under guidance from Oracle Support as this can damage the functionality of Grid Control and may require a re-installation.

#7 Clean up Agent: from the Agent $ORACLE_HOME

rm -r $ORACLE_HOME/sysman/emd/state/*
rm -r $ORACLE_HOME/sysman/emd/collection/*
rm -r $ORACLE_HOME/sysman/emd/upload/*
rm $ORACLE_HOME/sysman/emd/lastupld.xml
rm $ORACLE_HOME/sysman/emd/agntstmp.txt
rm $ORACLE_HOME/sysman/emd/blackouts.xml
rm $ORACLE_HOME/sysman/emd/protocol.ini

#8 Issue an agent clearstate from the Agent $ORACLE_HOME
$ORACLE_HOME/bin/emctl clearstate agent

#9 Secure the agent
$ORACLE_HOME/bin/emctl secure agent
*if this fails, double-check OMS information and start from step #2 again

#10 Start the agent
$ORACLE_HOME/bin/emctl start agent
*wait about 30 seconds before going to step 11 – give agent time to “wake up”

#11 Force an upload to the OMS
$ORACLE_HOME/bin/emctl upload agent

After 10-15 minutes the Agent and Host should show up in the new OMS.


Actions

Information

2 responses

16 10 2008
Andrew

Excellent instructions. Just what I needed. Thank you.

21 11 2008
steve

nice job, just what I needed.

Leave a comment