Monday, 22 February 2016

Install Oracle Management Agent / OMA on CentOS 6

Installing Oracle Management Agent OMA on CentOS 6Oracle Management Agent, abbreviated as OMA, is one of the core components of Oracle Enterprise Manager Cloud Control 12c. Oracle Management Agent / OMA enables us to convert an unmanaged host to a managed host and add that target to the Oracle Enterprise Manager for centralized monitoring and administration.

Oracle Management Agent or OMA works in conjunction with Oracle Enterprise Manager 12c plugins to monitor the targets running on a managed host. Therefore, if you want to monitor one or more targets running on a host, ensure that you first convert that unmanaged host to a managed host by installing an Oracle Management Agent / OMA on it, and then manually discover the targets running on that host to start monitoring them.

There are different methods of installation of Oracle Management Agent / OMA. In this article, we will use Push Deploy method to install Oracle Management Agent / OMA on an unmanaged CentOS 6 host directly from the EM Console.

 

Unmanaged Host Specification:

Hostname: dbserver.mydomain.com
IP Address: 170.172.0.40
Operating System: CentOS 6
RDBMS: Oracle Database 11g R2

 

Add Hostnames to Local DNS Resolvers:

Connect to Oracle Management Server / OMS using ssh as root user and execute following commands to add the hostname to Local DNS Resolver.

Note: These steps are not required, if you have configured a central DNS server for your network.

[root@oms12c ~]# cat >> /etc/hosts << EOF >170.172.0.40 dbserver.mydomain.com dbserver >EOF

Connect to unmanaged CentOS 6 host using ssh as root user and execute following commands to add the hostname to Local DNS Resolver.

[root@dbserver ~]# cat >> /etc/hosts << EOF >170.172.0.40 dbserver.mydomain.com dbserver >170.172.0.123 oms12c.mydomain.com oms12c >EOF

 

Adjust sudo settings:

Connect to unmanaged CentOS 6 host using ssh as root user and execute following commands to adjust sudo settings as required by Oracle Management Agent / OMA.

[root@dbserver ~]# sed -e '/requiretty/s/^#*/#/g' -i /etc/sudoers [root@dbserver ~]# sed -i 's/!visiblepw/visiblepw/g' /etc/sudoers [root@dbserver ~]# echo "oracle ALL=(ALL) ALL" >> /etc/sudoers

 

Open Oracle Management Agent / OMA port in the Linux Firewall:

Oracle Management Agent / OMA uses port 3872 , therefore, execute the following at unmanaged CentOS 6 host to open this port in Linux firewall.

[root@dbserver ~]# iptables -I INPUT 5 -m state --state NEW -p tcp --dport 3872 -j ACCEPT [root@dbserver ~]# service iptables save

 

Set Password for DBSNMP Database user:

Since, we are going to monitor a Database target on dbserver.mydomain.com, therefore, we have to unlock and set a password for DBSNMP database user, because Oracle Management Agent / OMA uses DBSNMP user for monitoring of database targets.

Therefore, connect to the Oracle database as a DBA user and execute following command.

SQL> ALTER USER DBSNMP IDENTIFIED BY 123;

 

Add Host Targets using Push Deploy Method:

Login to the Oracle Enterprise Manager 12c Console and open the Setup menu from the top-right corner of the page. Then open Add Targets and click on Add Targets Manually.

At the Add Targets Manually page, select Add Host Target and click on Add Host. Add a hostname and platform (Donot use IP addresses or it will be saved it as target name in Oracle Management Server or OMS). In our case, we use

Hostname: dbserver.mydomain.com
Platform: Linux x86-64

Use the following directories for the installation of OMA.

Installation Base Directory: /u01/app/oracle/agent12c
Instance Directory: /u01/app/oracle/agent12c/agent_inst

Click on Deploy Agent.

Oracle Management Agent / OMA will be installed automatically by Oracle Enterprise Manager 12c using Push Deploy method on CentOS 6 server.

 

Add Non-Host Targets

During addtion of a Host target, Oracle Management Agent / OMA was installed already on our unmanaged CentOS 6 host and it is now become a managed host.

To add non-host targets such as database, listener, etc. open the Setup menu from the top-right corner of the page. Open Add Targets and click on Add Targets Manually.

Select Add Non-Host Targets Using Guided Process (it also adds related targets) and select the target type as Oracle Database, Listener and Automatic Storage Management. Click on Add Using Guided Discovery.

Once the targets has been added, OMS will take a couple of minutes in collection, and then start showing statistics for the newly added targets.

Oracle Management Agent / OMA has been installed on CentOS 6 server using Push Deploy method.

Install Oracle Management Agent / OMA on CentOS 6


YOU MIGHT ALSO LIKE:

No comments:

Post a Comment