9 Converting Shared Agents to Standalone Agents
The Management Agent is an integral software component that enables you to convert an unmanaged host to a managed host in the Enterprise Manager system. The Management Agent works in conjunction with the plug-ins to monitor the targets running on that managed host.
With the first Oracle Management Service (OMS) you install, by default you receive a Management Agent called the Central Agent. The Central Agent is used for monitoring only the first OMS host, the first OMS, and the other targets running on the first OMS host. To monitor other hosts and the targets running on those hosts, you must install a separate Standalone Management Agent on each of those hosts.
Shared Agent is a Management Agent that is installed on a remote host, using the binaries of an existing Management Agent. The Management Agent that shares its software binaries, in this context, is called the Master Agent, and the one that is configured with an instance directory on the remote host is called a Shared Agent or an NFS Agent.
This chapter describes how to convert Shared Agents to Standalone Agents. In particular, this chapter covers the following:
Converting NFS or Shared Agents to Standalone Agents
Note:
You must carry out this procedure for every Shared Agent that you want to convert to a standalone Agent.
To convert NFS or Shared Agents to Standalone agents, follow these steps:
-
In the Master Agent host, navigate to the agent base directory and compress the directory excluding the following files:
-
agent_inst directory
-
root owned files in the sbin directory
To do so, execute the following command:
cd <agent base directory> zip -rq agentcoreimage.zip * -x sbin/nmb sbin/nmgsshe sbin/nmhs sbin/nmo sbin/nmopdpx sbin/nmosudo agent_inst For example, cd /u01/app/oracle/agent_nfs/agentbasedir zip -rq agentcoreimage.zip * -x sbin/nmb sbin/nmgsshe sbin/nmhs sbin/nmo sbin/nmopdpx sbin/nmosudo agent_inst
Perform the following steps in each of the Shared agents.
-
-
Stop the agent by executing the following command:
<sharedagent_inst>/bin/emctl stop agent For example, /u01/app/emstate/agent_inst/bin/emctl stop agent
-
Copy the compressed file to a local folder in the Shared Agent host by executing the following command:
cp <agent base directory>/agentcoreimage.zip <local directory> For example, cp /u01/app/oracle/agent_nfs/agentbasedir/agentcoreimage.zip /u01/stage
-
Unmount the agent base directory by executing the following command:
umount <path to the agent base directory> For example, umount /u01/app/oracle/agent_nfs/agentbasedir
Note:
You cannot run this command if you are not a root user.
-
Extract the compressed file from the local directory in the agent base directory by executing the following command:
unzip agentcoreimage.zip -d <agent base directory> For example, unzip /u01/stage/agentcoreimage.zip -d /u01/app/oracle/agent_nfs/agentbasedir
-
Run the <path to the agent home>/root.sh script as a root user.
-
Copy the instance home in the agent base directory and rename it to agent_inst to match the structure in the Master Agent, by executing the following command:
cp -r <local instance home> <agent base directory>/ For example, cp -r /u01/app/emstate/agent_inst/* /u01/app/oracle/agent_nfs/agentbasedir/agent_inst/
-
Start the Agent from the path <agent base directory>/agent_inst, by executing the following command:
<agent base directory>/agent_inst/bin/emctl start agent For example, /u01/app/oracle/agent_nfs/agentbasedir/agent_inst/bin/emctl start agent
-
Execute the following command to create an entry in the inventory by executing the following command:
$ORACLE_HOME/oui/bin/attachHome.sh -silent ORACLE_HOME=<$ORACLE_HOME> -force
-
Refresh the Oracle home collection by executing the following command:
<Agent Instance Home>/bin/emctl control agent runCollection <ORACLEHOME_TARGET_NAME>: oracle_home oracle_home_config
For example,
./u01/app/oracle/agent_nfs/agentbasedir/agent_inst/emctl control agent runCollection example.com:oracle_home oracle_home_config
Note:
<ORACLEHOME_TARGET_NAME> is present in the <Agent Instance Home>/sysman/emd/targets.xml file.
To refresh the Oracle home collection using the graphical interface, follow these steps:
-
On the Home page of the Management Agent, in the Summary section, click Oracle Home and Patch Details.
-
On the following page, click Refresh Configuration.
Note:
Perform this step for both Shared and Master Agents.
-