Anda di halaman 1dari 37

Oracle Enterprise Manager 12c

Metrics Monitoring and Management


Repository Views: Tips and Tricks

Suzanne Strasser
IOUG Webinar
April 2, 2013
How Can We Use OEM 12c to Solve the
Following Business Needs?
• Multiple production and development/test
databases, with different monitoring and alert
requirements for each group
• Production databases: generate critical alerts for
errors seen in the database alert log
• Development/test databases: generate warning alerts
only

• Need to be able to extract monitoring data


from OEM to import into an external graphing
tool
• For historical analysis, trending and forecasting
• To compare hosts with a different number of CPUs on
the same graph (CPU utilization)
Overview of Administration Groups
New Set target property Lifecycle status to “Production”

Production
Database All Targets
OEM adds DB to group Based on lifecycle status property

Administration Administration
Group: Production Group: Test

associate associate

Production Template Collection Test Template Collection

DB Monitoring Template A DB Monitoring Template B


Generate Critical alerts for ORA- errors Generate Warning alerts for ORA-errors

Host Monitoring Template A Host Monitoring Template B


CPU Utilization: Warning > 80% CPU Utilization: Warning > 95%
Administration Groups

• Allows us to automate the monitoring


requirements assigned to each target via the
target’s lifecycle status property
• Mission critical, production, stage, test, or development

• Can be defined by one or more hierarchy levels


based on the target properties

• At least one hierarchy level is needed, others are


optional

• Important to preplan the hierarchy levels since


once they have been established, they cannot be
changed
Define Target Properties
• Select the target
• Select the Oracle Database, Target Setup,
Properties menu item
Create Administration Group and
Hierarchy Levels
• Select the Enterprise,
Monitoring, Template
Collections menu option
Create Monitoring Templates
• Select the Enterprise, Monitoring, Monitoring
Templates menu option
Default Database Instance Monitoring
Template
Alert Log: Specify Collection Schedule
Set the Production Alert Log Filter

• OEM already monitors ORA-00600 errors under the “Incident”


set of metrics. Customize the below filter list as desired.
.*ORA-0*(54|227|239|240|255|279|308|353|355|356|445|494|600| … )\D.*
Create Template Collections

• Allow you to group several monitoring


templates together before associating them
with the desired administration group

• Create one template collection for production


and one for development/test
Template Collection List

• Select the Enterprise, Monitoring, Template


Collections menu option

• Click the Create button to create a new


template, or click the name of an existing
template to edit it.
Create the Production Template
Collection
• Only one monitoring template can be added
per target type.
Associate PROD_TEMPLATE Template Collection
with PROD_GROUP Administration Group
Set Synchronization Schedule
Synchronization Status
Extracting Monitoring Data from OEM
• Example metric: CPU Utilization (%) of a cpu
• Two production servers:
• Host db33 has 16 of 32 CPUs dedicated to Oracle
• Host db103 has 16 of 16 CPUs dedicated to Oracle

• Problem: for db33, OEM reports the “CPU


Utilization %” metric within its “Load” metric
group as the average percent across all 32
CPUs, not just the 16 dedicated to Oracle
• Average usage for db33 is only half of what it should be
• We want to be able to compare CPU utilization for
db33 and db103 on the same graph
Enable Collecting Data and Storing Data
for the “CPU Usage” Metric Group
• “CPU Usage” metric group collects data for
individual CPUs

• Out of the box, OEM does not store historical


data for the “CPU Usage” metric group in the
management repository; therefore this must
be enabled before we can see any graphs
Enable Collecting Data and Storing Data
for the “CPU Usage” Metric Group
• Change View to “All Metrics”
• Click the “Disabled” Collection Schedule link

• “Load” metric group (shown previously)


aggregates data across all CPU’s

• Out of the box, OEM does not store historical


data for the “CPU Usage” metric group in the
management repository, therefore this must be
enabled before we can see any graphs
Enabling Storage of CPU Usage Metric
Data into the Management Repository
OEM Graph: CPU Utilization for CPU 17
• Select Host, Monitoring, All Metrics menu option
• Expand “CPU Usage” metric group
• Select “CPU Utilization (%) of a cpu” metric
Management Repository Rollup Tables

• EM_METRIC_VALUES
• Raw data stored at its most detailed level for 7 days

• EM_METRIC_VALUES_HOURLY
• Raw data aggregated into hourly averages
• Retained for 32 days

• EM_METRIC_VALUES_DAILY
• Hourly average data aggregated into daily averages
• Retained for 12 months
Rollup Tables and Their Retention
Settings

• Use the following query to determine your


current settings:

• To change the settings (example, retain 2 years


of daily average data):
Management Repository Views:
gc$metric_values
• “Raw Data” view corresponding to the
EM_METRIC_VALUES table

• Key columns:
• ENTITY_NAME – the target or component name
• COLLECTION_TIME – data collection time in the target time zone
• METRIC_GROUP_NAME – name of the metric group
• METRIC_COLUMN_NAME – name of the metric column
• KEY_PART_1 – key part 1 of composite key
• VALUE – value of metric
Where to Find the Metric Group Name
and Metric Column Name?
• Query from
gc$metric_columns
• The values of
METRIC_GROUP_LABEL
and
METRIC_COLUMN_LABEL
will match the names
displayed in OEM
Querying Metric Group and Column
Names
Raw Data Query: gc$metric_values
“Raw Data” Graph in Excel
Management Repository Views:
gc$metric_values_hourly
• Hourly averages view corresponding to the
EM_METRIC_VALUES_HOURLY table

• Similar to the columns in the gc$metric_values view,


but VALUE has been replaced with:
• AVG_VALUE – average value of metric for the hour
• MIN_VALUE – minimum value of metric for the hour
• MAX_VALUE – maximum value of metric for the hour
• STDDEV_VALUE – standard deviation value of metric for the hour

• COLLECTION_TIME = the date and hour of aggregation


Hourly Averages

gc$metric_values_hourly
union with
gc$metric_values

• Most recent hourly


aggregate data is for
yesterday
• Must union with
gc$metric_values to
get today’s data (and
aggregate it hourly)
Hourly Average Graph in Excel:
with trend line
Management Repository Views:
gc$metric_values_daily
• Daily averages view corresponding to the
EM_METRIC_VALUES_DAILY table

• Similar to the columns in the gc$metric_values view,


but VALUE has been replaced with:
• AVG_VALUE – average value of metric for the day
• MIN_VALUE – minimum value of metric for the day
• MAX_VALUE – maximum value of metric for the day
• STDDEV_VALUE – standard deviation value of metric for the day

• COLLECTION_TIME = the date of aggregation


Daily Averages

gc$metric_values_daily
union with
gc$metric_values

• Most recent daily


aggregate data is for
yesterday
• Must union with
gc$metric_values to get
today’s data (and
aggregate it daily)
Daily Average Graph in Excel:
with trend line
References

• Oracle Enterprise Manager Cloud Control


Extensibility Programmer's Reference (Chapter
18):
• http://docs.oracle.com/cd/E24628_01/doc.121
/e25161/views.htm#sthref1292

• Oracle Enterprise Manager Cloud Control


Administrator’s Guide (Chapters 6, 7, and 20):
• http://docs.oracle.com/cd/E24628_01/doc.121
/e24473/toc.htm
Questions
Contact Information

• suzanne.strasser@returnpath.com

• http://www.returnpath.com

Anda mungkin juga menyukai