top of page

Add Linux Target to Oracle Enterprise Manager Cloud Control 13c

This article list out steps to add Linux (OEL 7) as a monitoring target to Oracle Enterprise Manager Cloud Control 13c. Note, the steps are same for 12c OEM as well.This method of agent deployment is also known as Push Method Deployment.



Install Oracle Linux 7


For this demonstration purpose, I have used virtualbox VM with 4 GB RAM and 120 GB hard disk. I have setup the virtual machine with exact same steps described in the following article.


I have set hostname as “dev.dbagenesis.com” for this linux target while installing OEL 7.


Install Oracle Linux on VirtualBox (OEL 7.7)



Install Oracle 12cR2


Add OEM server details to /etc/hosts file and below is how target server /etc/hosts file looks like

192.168.1.171         oem.dbagenesis.com            oem
192.168.1.172         dev.dbagenesis.com            dev

As this VM is going to act as OEM target, I am going to install Oracle 12cR2 and also create a database. This will allow us to monitor this new database from OEM console.

yum -y install oracle-database-server-12cR2-preinstall

Install below packages as they are required by OEM to install Agent on this target machine

yum install make -y
yum install binutils -y
yum install gcc -y
yum install libaio -y
yum install glibc-common -y
yum install libstdc++ -y
yum install sysstat -y
yum install glibc -y
yum install glibc-devel.i686 -y
yum install glibc-devel -y
yum install libXtst -y

Set password for Oracle user

passwd oracle

Create directories which will hold Oracle software and agent software installation

mkdir /u01
mkdir -p /u01/app/oracle/agent

chown -R oracle:oinstall /u01
chmod -R 775 /u01

Copy the 12cR2 software files under /u01 and unzip it

su - oracle

cd /u01
unzip linuxx64_12201_database.zip

You can choose to install the Oracle software using GUI method but I will be going with silent mode as it is quick and straightforward.

vi /tmp/12cR2_response.rsp

oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v12.2.0
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=dev.dbagenesis.com
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oraInventory
SELECTED_LANGUAGES=en
ORACLE_HOME=/u01/app/oracle/product/12.2.0.1
ORACLE_BASE=/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.OSDBA_GROUP=dba
oracle.install.db.OSOPER_GROUP=dba
oracle.install.db.OSBACKUPDBA_GROUP=dba
oracle.install.db.OSDGDBA_GROUP=dba
oracle.install.db.OSKMDBA_GROUP=dba
oracle.install.db.OSRACDBA_GROUP=dba
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
oracle.installer.autoupdates.option=SKIP_UPDATES

Run the installer in silent mode to start the Oracle software installation

./runInstaller -ignoreSysPrereqs -showProgress -silent -responseFile /tmp/12cR2_response.rsp

Set the Oracle user bash profile

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
	. ~/.bashrc
fi

# User specific environment and startup programs
export ORACLE_HOME=/u01/app/oracle/product/12.2.0.1
export ORACLE_SID=devdb
export AGENT_HOME=/u01/app/oracle/agent/agent_inst

PATH=$PATH:$HOME/.local/bin:$ORACLE_HOME/bin

export PATH

Don’t forget to execute the bash profile

. .bash_profile


Create Database


Let's create devdb database on this VM. I am using dbca silent mode for quick db creation

dbca -silent -createDatabase \
-templateName General_Purpose.dbc \
-gdbName devdb \
-sid devdb \
-createAsContainerDatabase false \
-emConfiguration NONE \
-datafileDestination /u01/app/db_files \
-storageType FS \
-characterSet AL32UTF8 \
-totalMemory 2048 \
-recoveryAreaDestination /u01/app/FRA


Create Listener


Fire NETMGR utility and create database listener and tns entries.



Add Linux Target via OEM


Before we can add the Linux target, we must add the target details to /etc/hosts file on OEM server

192.168.1.171         oem.dbagenesis.com            oem
192.168.1.172         dev.dbagenesis.com            dev

Login to OEM console via web browser and let us start adding the target

login to oracle enterprise manager - login to em console

On top right side, click on Setup >> Add Target >> Add Target Manually

oem 13c add targets manually

Under Add Host Targets >> click on Install Agent on Host

oem 13c install agent on host

Click on + Add option, give hostname and select platform. Click on Next

add linux target host and platform

Provide the agent installation directory /u01/app/oracle/agent. Click on Named Credential and give the oracle user id and password of the target system. Click on Root Credential and give root user id and password of the target system.


Make sure to delete anything that you see under Privileged Delegation Setting


Note: Named credential is the Oracle user ID & password of the target server with which OEM will be able to install agent software.
Root credential is the root user id & password of the target server with witch OEM will be able to execute root scripts.

installation details oem agent on target

Click Next, review the agent installation, and then click on Deploy Agent

add linux target to oem cloud control 13c - agent deployment summary

Once the installation is done, you can click on Targets >> Hosts to check the newly added host

oem 13c target hosts list


Monitor Database, Listener


Once the agent software is installed, it will not automatically start monitoring the database, listener, asm etc. You need to set it up to do it for you.


Navigate to Setup >> Add Target >> Add Targets Manually. Click on Add target using guided process

oem 13c add target using guided process - monitor database & listener

Select the below option and click on Add

oem 13c add database, listener and automatic storage management

Under specify host, click on Search Icon and select the target host where DB & listener resides. Then click on Next

database discovery on target host by OEM

OEM will discover the database on target system and list it. Select the database, give DBSNMP password (default is Oracle). Then click on test connection. If connection is successful, click ok then click on Next

oem 13c test connection to database

Check the review screen and click on Save

database discovery oem 13c add db target

Done, now your Database and listeners are also added to monitoring. You can check the by going to Targets >> Databases.



Removing a Target


To remove a target and all its monitoring from OEM, first bring down the target agent software. We can do this via OEM, under Targets >> All Targets search for the agent >> right click >> control >> shut down

removing a target oem agent shutdown

OEM will prompt you to provide credentials to login to target server so that it can shutdown the agent. We must provide the Named credentials of the Dev server and then click on Shutdown

oem agent shudown credential name

Wait until the agent software is shutdown. Once again Right Click agent >> Target Setup >> Agent Decommission

oem agent decommission

Click on continue to start removing the agent from the target server

oem agent decommission confirmation

OEM will list out all the targets (host, database, listener) that are being monitored by it and once you de-commission the agent, OEM will stop monitoring those targets. Click on Continue

add linux target to oem agent decommission targets monitoring

Done, the agent and all target monitoring are removed from the OEM.


Next, you will have to manually delete the agent software from the target server

On target system as oracle user
===============================

cd /u01/app/oracle/agent
rm -rf *

Related Posts

Heading 2

Add paragraph text. Click “Edit Text” to customize this theme across your site. You can update and reuse text themes.

bottom of page