Technical Blog Post
Abstract
How to install and configure the Monitoring Oracle database agent connected to Monitoring 8
Body
In this blog I will show how to install and configure Oracle agent delivered in APM agents 8.1.3 bundle. On below page you can find detailed information related to agent configuration:
After moving ipm_moni
C:\Users\Administrator\Downloads\ipm_monitoring_agents_win_8.1.3\APM_Agent_Install_8.1.3>installAPMAgents.bat
The following products are available for installation:
1) Monitoring Agent for Windows OS
2) Monitoring Agent for MySQL
3) Response Time Monitoring Agent
4) Monitoring Agent for Oracle Database
5) Monitoring Agent for WebLogic
6) Monitoring Agent for VMware VI
7) Monitoring Agent for DB2
8) Monitoring Agent for WebSphere Applications
9) Monitoring Agent for Cisco UCS
10) Monitoring Agent for Microsoft Hyper-V Server
11) Monitoring Agent for Microsoft IIS
12) Monitoring Agent for Microsoft SQL Server
13) Monitoring Agent for Active Directory
14) Monitoring Agent for Microsoft .NET
15) Monitoring Agent for Microsoft Exchange Server
16) Monitoring Agent for Microsoft Cluster Server
17) Monitoring Agent for MS SharePoint Server
18) Monitoring Agent for Microsoft Lync Server
19) all of the above
Type the numbers that correspond to the products that you want to install. Type"q" to quit selection.
If you enter more than one number, separate the numbers by a space or comma.
Type your selections here (For example: 1,2): 4
The following agents will be installed:
Monitoring Agent for Oracle Database
Are your selections correct [ 1-Yes, 2-No; default is "1" ]? 1
Specify the installation directory. [Default is C:\IBM\APM] :
The agents will be in installed in C:\IBM\APM.
Do you accept the license agreement(s) found in the directory C:\Users\Administrator\Downloads\ipm_monitoring_agents_win_8.1.3\APM_Agent_Install_8.1.3\licenses?
Please enter [ 1-to accept the agreement, 2-to decline the agreement ] : 1
User has accepted the license agreement(s).
Monitoring Agent for Oracle Database will be installed.
Installing Monitoring Agent for Oracle Database...
The Prerequisite Scanner will be used to check the system.
Preparing the Prerequisite Scanner to run.
Setting Prerequisite Scanner output directory to user defined directory: C:\IBM\APM\InstallITM\prereqscan\20170321_102557\
IBM Prerequisite Scanner
Version: 1.2.0.17
Build: 20150827
OS name: Windows Server 2012 R2 Standard
User name: Administrator
Machine Information
Machine name: W2012TEMA
Serial number: VMware-42 3f 28 ec 31 0e 0a c9-7f ae c3 e2 2f dd d3 9c
OS serial number: 00252-70000-00000-AA535
Scenario: Prerequisite Scan
KRZ - KRZ [version 06030108]:
KJM - KJM [version 08020000]:
Overall result: PASS
Detailed results are also available in: C:\IBM\APM\InstallITM\prereqscan\20170321_102557\result.txt
IBM Monitoring agents installation found in C:\IBM\APM.
Installation destination path: C:\IBM\APM
Installing JRE...
Installing Monitoring Agent for Oracle Database...
Agent installation completed. Configure the agent with the 'oracle_database-agent.bat config' command.
End running cmd /c "C:\IBM\APM\logs\install_agent_RZ.bat"
################################################################################
The following agents were installed successfully into the C:\IBM\APM directory:
Monitoring Agent for Oracle Database
Agent instance status:
No instances
The installation log file is C:\IBM\APM\logs\IM_Agents_install.log.
To configure your agents, use the following detailed instructions:
For Performance Management on Cloud:
http://ibm.biz/kc-ipmcloud-configagent
For Performance Management (on premises):
http://ibm.biz/kc-ipm-configagent
As part of the configuration instructions, you will use the following commands to configure and manage each installed agent:
Monitoring Agent for Oracle Database C:\IBM\APM\bin\oracle_database-agent.bat config or start or stop or status or uninstall
################################################################################
C:\Users\Administrator\Downloads\ipm_monitoring_agents_win_8.1.3\APM_Agent_Install_8.1.3>
When agent is installed you must configure via CLI or IBM Performance Management window. Before I started agent configuration I created Oracle user which will agent use to connect to Oracle database. I created user using sqlplus commands:
C:\IBM\APM\TMAITM6_x64>sqlplus sys/tems1234@orcl as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Let Mar 23 09:09:09 2017
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> CREATE USER gregor IDENTIFIED BY tems1234;
SQL> GRANT CONNECT TO gregor;
After that I created agent instance form Template:
I named my instance orcl:
After configuration you must grant needed permissions to user using krzgrant.sql script. On below link you can find official documentation:
C:\IBM\APM\TMAITM6_x64>sqlplus sys/tems1234@orcl as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Let Mar 23 09:09:09 2017
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> CREATE USER gregor IDENTIFIED BY tems1234;
SQL> GRANT CONNECT TO gregor;
QL> @krzgrant.sql gregor
SQL> set serveroutput on;
SQL> spool &2/krzgrant.log
Enter value for 2:
SQL> declare
2 version integer;
3 userName varchar(20);
4 isExist integer;
5 begin
6
7 userName:='&1';
8 isExist:=0;
9
10 select count(username)
11 into isExist
12 from dba_users where username=upper('&1');
13
14 if isExist = 0 then
15 dbms_output.put_line('The user '||userName||' does not exist, pleasecreate it first!');
16 return;
17 end if;
18
19 execute immediate 'alter session set NLS_NUMERIC_CHARACTERS=''.,''';
20
21 select to_number(substr(banner,instr(banner,'Release')+8,instr(banner,'.',1,2)-8-instr(banner,'Release')))*10
22 into version
23 from V$VERSION
24 where banner like 'Oracle%' and rownum < 2;
25
26 if version >=112 then
27 execute immediate 'grant select on GV_$ASM_DISKGROUP_STAT to '||userName;
28 execute immediate 'grant select on GV_$ASM_DISK_STAT to '||userName;
29 execute immediate 'grant select on GV_$CLUSTER_INTERCONNECTS to '||userName;
30 execute immediate 'grant select on GV_$FLASHBACK_DATABASE_LOGFILE to '||userName;
31 execute immediate 'grant select on V_$DATAGUARD_STATS to '||userName;
32 execute immediate 'grant select on V_$FLASH_RECOVERY_AREA_USAGE to '||userName;
33 execute immediate 'grant select on V_$LOGSTDBY_PROCESS to '||userName;
34 execute immediate 'grant select on V_$LOGSTDBY_PROGRESS to'||userName;
35 execute immediate 'grant select on V_$LOGSTDBY_STATE to '||userName;
36 elsif version =111 then
37 execute immediate 'grant select on GV_$ASM_DISKGROUP_STAT to '||userName;
38 execute immediate 'grant select on GV_$ASM_DISK_STAT to '||userName;
39 execute immediate 'grant select on GV_$CLUSTER_INTERCONNECTS to '||userName;
40 execute immediate 'grant select on GV_$FLASHBACK_DATABASE_LOGFILE to '||userName;
41 execute immediate 'grant select on V_$DATAGUARD_STATS to '||userName;
42 execute immediate 'grant select on V_$FLASH_RECOVERY_AREA_USAGE to '||userName;
43 execute immediate 'grant select on V_$LOGSTDBY_PROCESS to '||userName;
44 execute immediate 'grant select on V_$LOGSTDBY_PROGRESS to'||userName;
45 execute immediate 'grant select on V_$LOGSTDBY_STATE to '||userName;
46 elsif version =102 then
47 execute immediate 'grant select on GV_$ASM_DISKGROUP_STAT to '||userName;
48 execute immediate 'grant select on GV_$ASM_DISK_STAT to '||userName;
49 execute immediate 'grant select on GV_$CLUSTER_INTERCONNECTS to '||userName;
50 execute immediate 'grant select on V_$DATAGUARD_STATS to '||userName;
51 execute immediate 'grant select on V_$FLASH_RECOVERY_AREA_USAGE to '||userName;
52 execute immediate 'grant select on V_$LOGSTDBY_PROCESS to '||userName;
53 execute immediate 'grant select on V_$LOGSTDBY_PROGRESS to'||userName;
54 execute immediate 'grant select on V_$LOGSTDBY_STATE to '||userName;
55 elsif version =101 then
56 execute immediate 'grant select on DBA_LOGSTDBY_PROGRESS to '||userName;
57 execute immediate 'grant select on GV_$ASM_DISK to '||userName;
58 execute immediate 'grant select on GV_$ASM_DISKGROUP to '||userName;
59 execute immediate 'grant select on V_$LOGSTDBY to '||userName;
60 else
61 dbms_output.put_line('It is an unsupported version!');
62 return;
63 end if;
64
65 ---------------------------------------------
66 -- Grant common objects
67 ---------------------------------------------
68
69 execute immediate 'grant select on DBA_CLUSTERS to '||userName;
70 execute immediate 'grant select on DBA_DATA_FILES to '||userName;
71 execute immediate 'grant select on DBA_EXTENTS to '||userName;
72 execute immediate 'grant select on DBA_FREE_SPACE to '||userName;
73 execute immediate 'grant select on DBA_HIST_SNAPSHOT to '||userName;
74 execute immediate 'grant select on DBA_HIST_SQLSTAT to '||userName;
75 execute immediate 'grant select on DBA_HIST_SQLTEXT to '||userName;
76 execute immediate 'grant select on DBA_HIST_SQL_PLAN to '||userName;
77 execute immediate 'grant select on DBA_HIST_SYSMETRIC_SUMMARY to '||userName;
78 execute immediate 'grant select on DBA_INDEXES to '||userName;
79 execute immediate 'grant select on DBA_OBJECTS to '||userName;
80 execute immediate 'grant select on DBA_SEGMENTS to '||userName;
81 execute immediate 'grant select on DBA_TABLES to '||userName;
82 execute immediate 'grant select on DBA_TABLESPACES to '||userName;
83 execute immediate 'grant select on DBA_TEMP_FILES to '||userName;
84 execute immediate 'grant select on DBA_UNDO_EXTENTS to '||userName;
85 execute immediate 'grant select on GV_$ARCHIVE_DEST to '||userName;
86 execute immediate 'grant select on GV_$ARCHIVE_DEST_STATUS to '||userName;
87 execute immediate 'grant select on GV_$ASM_CLIENT to '||userName;
88 execute immediate 'grant select on GV_$ASM_TEMPLATE to '||userName;
89 execute immediate 'grant select on GV_$BGPROCESS to '||userName;
90 execute immediate 'grant select on GV_$BUFFER_POOL_STATISTICS to '||userName;
91 execute immediate 'grant select on GV_$DATAFILE_HEADER to '||userName;
92 execute immediate 'grant select on GV_$DLM_MISC to '||userName;
93 execute immediate 'grant select on GV_$ENQUEUE_STAT to '||userName;
94 execute immediate 'grant select on GV_$FILEMETRIC to '||userName;
95 execute immediate 'grant select on GV_$FILESTAT to '||userName;
96 execute immediate 'grant select on GV_$FLASHBACK_DATABASE_LOG to '||userName;
97 execute immediate 'grant select on GV_$GES_BLOCKING_ENQUEUE to '||userName;
98 execute immediate 'grant select on GV_$INSTANCE to '||userName;
99 execute immediate 'grant select on GV_$LATCH to '||userName;
100 execute immediate 'grant select on GV_$LATCH_CHILDREN to '||userName;
101 execute immediate 'grant select on GV_$LIBRARYCACHE to '||userName;
102 execute immediate 'grant select on GV_$LOCK to '||userName;
103 execute immediate 'grant select on GV_$LOCKED_OBJECT to '||userName;
104 execute immediate 'grant select on GV_$LOG to '||userName;
105 execute immediate 'grant select on GV_$OPTION to '||userName;
106 execute immediate 'grant select on GV_$OSSTAT to '||userName;
107 execute immediate 'grant select on GV_$PARAMETER to '||userName;
108 execute immediate 'grant select on GV_$PGASTAT to '||userName;
109 execute immediate 'grant select on GV_$PGA_TARGET_ADVICE to '||userName;
110 execute immediate 'grant select on GV_$PROCESS to '||userName;
111 execute immediate 'grant select on GV_$RESOURCE_LIMIT to '||userName;
112 execute immediate 'grant select on GV_$ROLLSTAT to '||userName;
113 execute immediate 'grant select on GV_$ROWCACHE to '||userName;
114 execute immediate 'grant select on GV_$SEGMENT_STATISTICS to '||userName;
115 execute immediate 'grant select on GV_$SERVICES to '||userName;
116 execute immediate 'grant select on GV_$SESSION to '||userName;
117 execute immediate 'grant select on GV_$SESSION_WAIT to '||userName;
118 execute immediate 'grant select on GV_$SESS_IO to '||userName;
119 execute immediate 'grant select on GV_$SGA to '||userName;
120 execute immediate 'grant select on GV_$SGAINFO to '||userName;
121 execute immediate 'grant select on GV_$SGASTAT to '||userName;
122 execute immediate 'grant select on GV_$SORT_SEGMENT to '||userName;
123 execute immediate 'grant select on GV_$SQL to '||userName;
124 execute immediate 'grant select on GV_$SYSMETRIC to '||userName;
125 execute immediate 'grant select on GV_$SYSMETRIC_HISTORY to '||userName;
126 execute immediate 'grant select on GV_$SYSMETRIC_SUMMARY to '||userName;
127 execute immediate 'grant select on GV_$SYSSTAT to '||userName;
128 execute immediate 'grant select on GV_$SYSTEM_PARAMETER to '||userName;
129 execute immediate 'grant select on GV_$UNDOSTAT to '||userName;
130 execute immediate 'grant select on SYS.OBJ$ to '||userName;
131 execute immediate 'grant select on SYS.TS$ to '||userName;
132 execute immediate 'grant select on SYS.UNDO$ to '||userName;
133 execute immediate 'grant select on V_$ACTIVE_INSTANCES to '||userName;
134 execute immediate 'grant select on V_$ARCHIVED_LOG to '||userName;
135 execute immediate 'grant select on V_$ARCHIVE_DEST to '||userName;
136 execute immediate 'grant select on V_$ARCHIVE_DEST_STATUS to '||userName;
137 execute immediate 'grant select on V_$ARCHIVE_GAP to '||userName;
138 execute immediate 'grant select on V_$BGPROCESS to '||userName;
139 execute immediate 'grant select on V_$DATABASE to '||userName;
140 execute immediate 'grant select on V_$DATAFILE to '||userName;
141 execute immediate 'grant select on V_$DATAFILE_HEADER to '||userName;
142 execute immediate 'grant select on V_$DATAGUARD_STATUS to '||userName;
143 execute immediate 'grant select on V_$INSTANCE to '||userName;
144 execute immediate 'grant select on V_$LOCK_TYPE to '||userName;
145 execute immediate 'grant select on V_$LOG to '||userName;
146 execute immediate 'grant select on V_$LOGFILE to '||userName;
147 execute immediate 'grant select on V_$LOGSTDBY_STATS to '||userName;
148 execute immediate 'grant select on V_$LOG_HISTORY to '||userName;
149 execute immediate 'grant select on V_$MANAGED_STANDBY to '||userName;
150 execute immediate 'grant select on V_$PARAMETER to '||userName;
151 execute immediate 'grant select on V_$RECOVERY_FILE_DEST to '||userName;
152 execute immediate 'grant select on V_$RECOVERY_PROGRESS to '||userName;
153 execute immediate 'grant select on V_$SPPARAMETER to '||userName;
154 execute immediate 'grant select on V_$STANDBY_LOG to '||userName;
155 execute immediate 'grant select on V_$TABLESPACE to '||userName;
156 execute immediate 'grant select on V_$TEMPFILE to '||userName;
157 execute immediate 'grant select on V_$VERSION to '||userName;
158
159 ------------------------------------------------
160 -- Grant create session to the user
161 ------------------------------------------------
162 execute immediate 'grant connect to '||userName;
163 execute immediate 'grant create session to '||userName;
164
165 ------------------------------------------------
166 end;
167 /old 7: userName:='&1';new 7: userName:='gregor';old 12: from dba_users where username=upper('&1');new 12: from dba_users where username=upper('gregor');
PL/SQL procedure successfully completed.
SQL> spool off
SQL> set echo off;
SQL>
When configuration is done start Oracle database agent and open APM console. Oracle agent should show up in your dashboard:
Hope you wing this log helpful.
Subscribe and follow us for all the latest information directly on your social feeds:
|
|
|
Check out all our other posts and updates: | |
Academy Blogs: | h |
Academy Videos: | http://ow.ly/PIKFz |
Academy Google+: | http://ow.ly/Dj3nn |
Academy Twitter Handle: | http://ow.ly/Dj35c |
UID
ibm11277320