Monday, December 5, 2022

Deploying OEM agent manually using agentDeploy.sh script

 

  1. Acquiring the Management Agent Software and Downloading it onto the OMS Host Using EM CLI.

a.  Login into OMS host and login into emcli

oracle@oem/as:$ . oraenv

ORACLE_SID = [oem] ? oem

The Oracle base remains unchanged with value oms13c2

oracle@oem/as:$ emcli login -username=sysman

Enter password :

 

Login successful

b.  Synchronize emcli

emcli sync

Synchronized successfully

c.  Identify the platform

oracle@oem/as:$ emcli get_supported_platforms

-----------------------------------------------

Version = 13.4.0.0.0

 Platform = Oracle Solaris on SPARC (64-bit)

-----------------------------------------------

Version = 13.4.0.0.0

 Platform = Linux x86-64

-----------------------------------------------

Platforms list displayed successfully.

d.  Download the Management Agent software from the Software Library to a temporary directory on the OMS host

export UNZIP_LOC= /usr/bin/unzip

Below command will fail if UNZIP_LOC is not set like above 

Extracting plugins failed.

If your agent image platform and the emcli client setup is on a different platform then you need to set the environment variable UNZIP_LOC to the absolute path of unzip utility location  which is greater than or equal to version 6.0.

emcli get_agentimage -destination=/tmp/oemcloud_linux_agent_134 -platform="Linux x86-64" -version=13.4.0.0.0

=== Partition Detail ===

Space free : 282 GB

Space required : 1 GB

Downloading /tmp/oemcloud_linux_agent_134/13.4.0.0.0_AgentCore_226.zip

File saved as /tmp/oemcloud_linux_agent_134/13.4.0.0.0_AgentCore_226.zip

Downloading /tmp/oemcloud_linux_agent_134/13.4.0.0.0_Plugins_226.zip

File saved as /tmp/oemcloud_linux_agent_134/13.4.0.0.0_Plugins_226.zip

Downloading /tmp/oemcloud_linux_agent_134/unzip

File saved as /tmp/oemcloud_linux_agent_134/unzip

Executing command: /usr/bin/unzip /tmp/oemcloud_linux_agent_134/13.4.0.0.0_Plugins_226.zip -d /tmp/oemcloud_linux_agent_134

Exit status is:0

Agent Image Download completed successfully.



2.      Transfer the Management Agent Software to the Destination Host.



3.      Install agent using agentdeploy script in destination host

a.      On destination host extract conetents of the zip file

cd /tmp/oemcloud_linux_agent_134

[oracle@tuslpmdmoda02a oemcloud_linux_agent_134]$ unzip 13.4.0.0.0_AgentCore_226.zip

Archive:  13.4.0.0.0_AgentCore_226.zip

  inflating: agentcore.bin

  inflating: agent.rsp

  inflating: agentDeploy.sh

  inflating: agentimage.properties

  inflating: unzip

  inflating: zip

   creating: plugins/

  inflating: plugins/oracle.sysman.si.discovery.plugin-13.4.1.0.0.farb

  inflating: plugins/oracle.sysman.db.discovery.plugin-13.4.1.0.0.farb

  inflating: plugins/oracle.fmw.gg.discovery.plugin-13.4.1.0.0.farb

  inflating: plugins/oracle.sysman.emas.discovery.plugin-13.4.1.0.0.farb

  inflating: plugins/oracle.sysman.xa.discovery.plugin-13.4.1.0.0.farb

  inflating: plugins/oracle.sysman.oh.agent.plugin-13.4.0.0.0.farb

  inflating: plugins/oracle.sysman.oh.discovery.plugin-13.4.0.0.0.farb

  inflating: plugins.txt




b.  Edit the response file agent.rsp

OMS_HOST=<OMS host name>

EM_UPLOAD_PORT=7799 (Use same post used by OMS)

AGENT_REGISTRATION_PASSWORD=<sysman password>

Note:Below process will fail to register with OMS if agent registration password is wrong.If you don’t know agent registration password create new one

c.  Invoke the deployment script and pass the response file

./agentDeploy.sh AGENT_BASE_DIR=/u01/app/oracle/em/agent RESPONSE_FILE=/tmp/oemcloud_linux_agent_134/agent.rsp

We can see below messages from installation log

Agent Configuration completed successfully

The following configuration scripts need to be executed as the "root" user. Root script to run : /u01/app/oracle/em/agent/agent_13.4.0.0.0/root.sh

/u01/app/oracle/em/agent/agent_13.4.0.0.0/cfgtoollogs/agentDeploy/agentDeploy_2021-05-04_14-20-30-PM.log

Waiting for agent targets to get promoted...

Successfully Promoted agent and its related targets to Management Agent



4.       run root script as indicated in the deploy messages

 



5.      Check agent status and update oset file under /usr/local/bin

emctl status agent

Oracle Enterprise Manager Cloud Control 13c Release 4

Copyright (c) 1996, 2020 Oracle Corporation.  All rights reserved.

---------------------------------------------------------------

Agent Version          : 13.4.0.0.0

OMS Version            : 13.4.0.0.0

Protocol Version       : 12.1.0.1.0

Agent Home             : /u01/app/oracle/em/agent/agent_inst

Agent Log Directory    : /u01/app/oracle/em/agent/agent_inst/sysman/log

Agent Binaries         : /u01/app/oracle/em/agent/agent_13.4.0.0.0

Core JAR Location      : /u01/app/oracle/em/agent/agent_13.4.0.0.0/jlib

Agent Process ID       : 54859

Parent Process ID      : 54722

Agent URL              : https://tuslpmdmoda02a.unisource.corp:3872/emd/main/

Local Agent URL in NAT : https://tuslpmdmoda02a.unisource.corp:3872/emd/main/

Repository URL         : https://tusspoem02.unisource.corp:1159/empbs/upload

Started at             : 2021-05-04 14:20:54

Started by user        : oracle

Operating System       : Linux version 4.14.35-2025.404.1.2.el7uek.x86_64 (amd64)

Number of Targets      : 3

Last Reload            : (none)

Last successful upload                       : 2021-05-04 14:32:12

Last attempted upload                        : 2021-05-04 14:32:12

Total Megabytes of XML files uploaded so far : 0.4

Number of XML files pending upload           : 0

Size of XML files pending upload(MB)         : 0

Available disk space on upload filesystem    : 71.39%

Collection Status                            : Collections enabled

Heartbeat Status                             : Ok

Last attempted heartbeat to OMS              : 2021-05-04 14:32:57

Last successful heartbeat to OMS             : 2021-05-04 14:32:57

Next scheduled heartbeat to OMS              : 2021-05-04 14:33:57

 

---------------------------------------------------------------

Agent is Running and Ready



6.      Add other non-host targets like below

From OEM console setup>Add target>Configure auto discovery

You can see list of hosts

 

Click on the corresponding cell under discovered targets column and click on promote button for your desired targets and it will be automatically added.




No comments:

Post a Comment

When SQL plan baseline is not used

 Thank you very much for your interest. Problem Statement: Lets assume you are reported about an application query running slow in one envir...