Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Manage Beyond Limits: Enterprise Manager CLI and Other Extensibility Features Subhadeep Sengupta Principal Product Manager Maureen Byrne Product Manager Ray Smith Portland General Electric
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Session: CON9587
Enterprise Manager 12c was designed to be extensible.
While there is a comprehensive set of management and monitoring capabilities provided
out-of-box, datacenters can easily supplement the out-of-box capabilities with custom
extensions to meet their own unique management requirements.
In this session, we will discuss how you can extend Enterprise Manager to meet these
requirements. This includes monitoring of new types of targets via plug-ins, extending
configuration data collected using custom configuration collections, monitoring new
conditions using metric extensions, and automating process workflows using EM CLI With
Scripting Option which is one of the key enhancements in Enterprise Manager 12.1.0.3.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Safe Harbor
The following is intended to outline our general product direction. It is
intended for information purposes only, and may not be incorporated into
any contract. It is not a commitment to deliver any material, code, or
functionality, and should not be relied upon in making purchasing
decisions. The development, release, and timing of any features or
functionality described for Oracle ’ s products remains at the sole
discretion of Oracle.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
We will be Talking about…
Modes of Extensibility
Create New Target Type
Extend existing Target Type
Extend EM Interface : EM CLI
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Enterprise Manager: Modes of Extensibility
Modes of
Extensibility
Extend EM
Interface
Extend Existing
Target Type
Create New
Target Type
Plug-ins
EDK
Reports
Config Extensions
Metric Extensions
EM CLI with
Scripting
option
Plug-in Builder
Enhanced
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Enterprise Manager: Modes of Extensibility
Modes of
Extensibility
Extend EM
Interface
Extend Existing
Target Type
Create New
Target Type
Plug-ins
EDK
Reports
Config Extensions
Metric Extensions
Plug-in Builder
EM CLI with
Scripting
option
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Enterprise Manager: Types of Plug-ins
• All out-of-box target types (Database, Middleware,
etc) are modeled as plug-ins
• Can be delivered independent of platform releases
• Plug-in type: Add-on
– Provide code level Extensibility, & can access the Platform
functionality through Java SDK
– However, Deployment requires a Downtime on OMS
• Plug-in type: Metadata Plug-in
– Provides a sandboxed integration model for a target type or
group of target types
– Zero ‘0’ downtime deployment
DB
12c MW X
Enterprise
Manager Platform
Repository
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Plug-ins: Where do you get them? Self Update: Oracle Provided Content
Self Update
Delivers new features and
updates
Single console to search,
download and
manage target plug-ins
Proactive notification for Oracle
supplied updates if running in
connected mode
Supports Online & Offline
modes
Allows import of non-Oracle
entities
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Plug-ins: Where do you get them? Extensibility Exchange: Partner and Community Provided
Place to list, share, and
promote EM artifacts
Over 126 entries; mostly plug-
ins
Contributions by Oracle,
partners, third party vendors,
and You!!
Search and download content
for use
Details on development
resources
Search • Learn • Contribute
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Plug-In Manager Single window Solution for all (Un)Deployment
Integrated with Self Update
Plug-ins must be deployed to OMS
before agents
Download, Deploy and Upgrade
Plug-Ins across OMS and agent
Option to resume the plug-in
deployment. It will start from failed
step.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Community Feedback
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Extensibility Development Kit (EDK)
• Documentation: Extensibility Books
• Programmers Guide - contains
feature overview
• Programmers Reference - provides
code snippets and samples
• SDK Specification – documentation
for all XSDs, web services, etc
• Sample Plug-ins
• 5 sample plug-ins out-of-the-box
ranging from basic to advanced
•Tools
• Command line utility called empdk to
• convert EM 11g plug-ins to EM
12.1
• validate and package a plug-in
archives
• Plug-in Builder
• Use emcli import_update to import
plug-ins into EM
• Collection of tools, samples, and documentation required to develop plug-ins
• Delivered via Self Update
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Scope of Plug-in: Supported Features
Discover targets and Collect Configuration
Monitoring and Incident
Management
Active Operations
(Jobs and Configuration
Sync)
Report
Compliance and Drift
Tracking Service Level Management
Custom
User
Interface
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Unveiling Plug-in Builder
IDE for Plug-in development - a JDeveloper
extension.
Visual, Declarative approach to Plug-in
development .
Kick-start development by Importing Samples from
EDK
In-line documentation within the code editor.
Integrated with `empdk` tool for all validation &
creation
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Enterprise Manager: Modes of Extensibility
Modes of
Extensibility
Extend EM
Interface
Extend Existing
Target Type
Create New
Target Type
Plug-ins
EDK
Reports
Config Extensions
Metric Extensions
Plug-in Builder
EM CLI with
Scripting
option
*Covered in customer reference
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Configuration Extensions (CE) Extend Target Collections
Configuration counterpart of Metric Extensions
Allows customers to augment configuration data
collected by EM
Extend ANY target
Go to Enterprise->Configuration->Configuration
Extensions
Multiple Collection Methods:
– Entire File
– OS Command Output
– SQL Query Output
UI driven definition utilizing rich set of out-of-
box parsers that matches the data format
All configuration management features (search,
history, etc) available
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Configuration Extensions (CE) Use Case: Report against data stored in custom tables
ID Name Age
1 John 35
2 Jane 22
Table: People
SQL CE:
Select name,
age from people;
1. Identify the data
to collect from
databases
managed by EM
2. Create a CE
• provide the sql
to extract the
data
• select a parser
to format the
data
CE
3. Associate CE
with multiple
databases. Daily
collection
frequency by
default.
4. Data now stored
in EM repository
and can be viewed
or used for
comparisons,
search, reports, etc
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Enterprise Manager: Modes of Extensibility
Modes of
Extensibility
Extend EM
Interface
Extend Existing
Target Type
Create New
Target Type
Plug-ins
EDK
Reports
Config Extensions
Metric Extensions
Plug-in Builder
EM CLI with
Scripting
option
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 20
Introduced in 12c
Tool Exposing Enterprise
Manager Functionality
Efficiently Automate
Repetitive Tasks
Features
Enterprise Manager: Command Line Interface What is it?
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 21
Enhanced CLI framework
Support for Jython Scripting(v2.5.1
bundled with kit)
– Standardized output;
easier scripting and parsing
– Stateless mode;
better scalability
– Use programming constructs
Existing scripts still work
New Features
Enterprise Manager: Command Line Interface
Enhanced Enhanced
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 22
Standard Mode
– Single command at a time
Interactive Mode
– Sql*plus–like process
Script Mode
– Multiple Commands Requiring Programming Logic
Three Modes
Enterprise Manager: Command Line Interface Three modes of Operation
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Command Line Interface: Three Modes Example Use Cases
Ideal Use Cases Example Use Case
Standard Mode
Single command execution
Backwards compatibility
Interactive
Mode
Multiple command execution
Interactive(sql*plus like) environment
Ideal for testing single or sequenced
commands
Testing the addition of multiple targets to
a group
Running adhoc commands
Script Mode
Multiple command execution
Ideal for complex command execution
Ideal for tasks involving many targets
using programming constructs
Updating the password for all database
targets in enterprise
Blackouts and Patching
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 24
EM Verbs now Procedures
Every EM Procedure returns
a Response Object:
– exit_code()
– error()
– isJson()
– out()
Response Objects
Command Line Interface: Getting Started The Building Blocks
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 25
1. Execute
2. Prompt - emcli
3. Set Client Properties()
- OMS URL
- Trust Certificate
- Login()
4. Call Procedures
Interactive Mode
Command Line Interface: Interactive Mode Getting Started – The Building Blocks
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Interactive Mode Demo
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
#Import all emcli verbs to current program
from emcli import *
set_client_property('EMCLI_OMS_URL',‘ https://myoms.us.oracle.com/em')
set_client_property('EMCLI_TRUSTALL', 'true')
login(username=sys.argv[0])
res = emcli.get_targets(targets="oracle_database")
print 'Number of targets:'+str(len(res.out()['data']))
print 'Exit code :'+str(res.exit_code())
print 'Errors :'+res.error()
print 'IsJson :'+str(res.isJson())
Script Mode - The Building Blocks
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Script Mode Demo
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 29
Key Points
New Interactive and Script Modes
Support for:
– Jython Scripting Language
– JSON Output format
OTN Resources
– EM CLI Documentation
(Enterprise Manager --> Extensibility)
– Screen Watches
(Enterprise Manager --> Framework and Infrastructure)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Enterprise Manager: Modes of Extensibility
Modes of
Extensibility
Extend EM
Interface
Extend Existing
Target Type
Create New
Target Type
Plug-ins
EDK
Reports
Config Extensions
Metric Extensions
Plug-in Builder
EM CLI with
scripting
support
@RaySmithAce
• Active IOUG member
– Collaborate New Speaker Mentor
– SELECT Journal Executive Editor
– OEM SIG Contributing Member
• http://oramanageability.wordpress.com/
• Oracle Technologist & DBA
Portland General Electric
• Integrated electric utility in Portland, Oregon
– 160 Oracle databases
– 90 hosts
• Monitoring
• Maintenance
• Reporting
Modes of Extensibility
Extend EM
Interface
Extend Existing Target
Type
Create New Target
Type
Plug-ins
EDK
Reports
Config Extensions
Metric Extensions
Plug-in Builder
EM CLI with
Scripting option
Enterprise Manager: Modes of Extensibility
Scripting Option at PGE
Rest of the Jython Script
Run-time Example
> emcli @emcli_functions.py sysman Some_P3assword GetAgentNames
oramgmt01.corp.dom:3872
oramgmt02.corp.dom:3872
oramgmt03.corp.dom:3872
Modes of Extensibility
Extend EM
Interface
Extend Existing Target
Type
Create New Target
Type
Plug-ins
EDK
Reports
Config Extensions
Metric Extensions
Plug-in Builder
EM CLI with
Scripting option
Enterprise Manager: Modes of Extensibility
Information Publisher Reports
Build Your Own Reports
• Click the radio-button next to the original report
• Select Create Like button
• Give it a new name and start editing
Define the Report: General Tab
• Title & Description displayed in menus for all users
• Category & Subcategory organize your reports
• Create your own categories
Populate the Report: Elements Tab
Publish the Report: Access Tab
http..//[Your Console URL]/public/reports
PGE's Public Reports Page
Resources
Ask for help >
Chapter 19:
Using Management
Repository Views
Distill Oracle's Query SELECT gt.external_name || ' ' || REGEXP_SUBSTR ( gt.version, '^[[:digit:]]+\.[[:digit:]]+' ) AS
"DB_INSTALLATION_LBL",
gt.target_name AS "TARGET_LBL",
gt.host_name AS "HC_TARGET_NAME",
gt.container_location AS "ORACLE_HOME_LBL",
gt.version AS "VERSION_LBL"
FROM mgmt$oracle_sw_grp_targets gt,
(SELECT UNIQUE m.member_target_guid AS mguid
FROM mgmt$target_flat_members m
WHERE m.aggregate_target_guid = ??EMIP_BIND_TARGET_GUID??
UNION
SELECT UNIQUE t.target_guid as mguid
FROM mgmt$target t
WHERE t.TARGET_GUID = ??EMIP_BIND_TARGET_GUID??) ts
WHERE gt.mtype = 'oracle_database‘
AND ts.mguid = gt.target_guid;
SELECT DISTINCT target_name AS database_name,
host_name,
container_location AS oracle_home,
version
FROM mgmt$oracle_sw_grp_targets
WHERE mtype=‘oracle_database’;
Own the Data: Scoop Schema
• Create SCOOP schema views for reporting
– Adaptable without changing the report
– Tailored to your internal customers
• Procedure
1. Create SCOOP as an OEM Administrator
2. Grant SCOOP the EM_ALL_VIEWER role
3. Start building views
4. Create public synonyms
5. Grant SELECT on those views to MGMT_VIEW
NEVER change the SYSMAN schema
List 11g Databases CREATE OR REPLACE FORCE VIEW scoop.oem_11gr1_databases AS
SELECT b.property_value AS life_cycle,
a.database_name,
a.dbversion,
a.release,
a.edition,
a.host
FROM sysman.mgmt$db_dbninstanceinfo a,
sysman.mgmt$target_properties b
WHERE a.target_guid = b.target_guid
AND b.property_name = 'orcl_gtp_lifecycle_status'
AND a.dbversion LIKE '11.1%'
ORDER BY life_cycle, database_name;
CREATE OR REPLACE PUBLIC SYNONYM oem_11gr1_databases FOR scoop.oem_11gr1_databases;
GRANT SELECT ON scoop.oem_11gr1_databases TO mgmt_view;
Modes of Extensibility
Extend EM
Interface
Extend Existing Target
Type
Create New Target
Type
Plug-ins
EDK
Reports
Config Extensions
Metric Extensions
Plug-in Builder
EM CLI with
Scripting option
Enterprise Manager: Modes of Extensibility
Metric Extensions
• Wizard-driven process
– Build
– Test
– Maintain
• Chapter 8 – Metric Extensions
Metric Extension Page
General Properties
Create New Adapter
Create the Columns
Column name:
Name from
SQL query
Display name:
Name shown your report or
in your metric
Column Types:
Key Column for common value
Data Column for related data
Value Type:
As appropriate
Test then Deploy
SYSMAN Metric Extension Data
Copyright © 2013, Oracle and/or its affiliates. All rights reserved. 56
Extendable Enterprise Manager 12c Key Takeaways
Extensibility
Plug-in
Available
Oracle Self
Update
Non-Oracle Extensibility Exchange
Create
Plug-in EDK
Plug-in
Builder
Without
Plug-in
Custom Reports
Metric Extensions
Custom Configurations
Plu
g-in
Mgr.
EM
CL
I
The New Architecture of
Cloud Control 12c :
Platform <-> Plug-in model
provides the most Agile and
Extensible foundation for
Enterprise Cloud
Management.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Summary
Standardize: EM12c
Productize: Plug-in builder
Incubate : Extend OOB
Operate:
EM CLI
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Documentation
Screen Watches
– Framework and
Infrastructure
Extensibility Exchange
Community, Sharing,
Best Practices, Building
Library
Resources
Command Line Interface: Resources Oracle Technology Network
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Graphic Section Divider
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.