oracle enterprise manager plug-in for postgresql · pdf file2 oracle enterprise manager...

16
ORACLE ENTERPRISE MANAGER PLUG-IN FOR PostgreSQL User Guide

Upload: buicong

Post on 06-Feb-2018

237 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: ORACLE ENTERPRISE MANAGER PLUG-IN FOR PostgreSQL · PDF file2 Oracle Enterprise Manager Plug-in for PostgreSQL User Guide NOTE: This document supports the version of each product listed,

ORACLE ENTERPRISE MANAGER PLUG-IN FOR

PostgreSQL

User Guide

Page 2: ORACLE ENTERPRISE MANAGER PLUG-IN FOR PostgreSQL · PDF file2 Oracle Enterprise Manager Plug-in for PostgreSQL User Guide NOTE: This document supports the version of each product listed,

2 Oracle Enterprise Manager Plug-in for PostgreSQL User Guide

NOTE: This document supports the version of each product listed, as well as all subsequent versions, until a new edition replaces it.

You can find the most up-to-date technical documentation on the Blue Medora support site at: http://support.bluemedora.com.

The Blue Medora website also provides the latest product updates. If you have comments about this documentation, submit your feedback to: [email protected].

1. Platforms and Versions Supported . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.1 Oracle Enterprise Manager (OEM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2 PostgreSQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.3 Oracle Management Agent (OMA) Operating Systems . . . . . . . . . . . . . . 31.4 Oracle Management Server (OMS) Operating Systems . . . . . . . . . . . . . 31.5 PostgreSQL Database Operating System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2. Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.1 Monitoring Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32.2 PostgreSQL Monitoring Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

3. Install and Configure the Plug-in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43.1 Importing the OPAR File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43.2 Deploying the Plug-in on a Management Server (OMS) . . . . . . . . . . . . . 53.3 Deploying the Plug-in on Management Agent (OMA) . . . . . . . . . . . . . . . . 6

4. Setting Up a Target . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74.1 Adding Targets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74.2 Specifying Target Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

5. Monitoring Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95.2 Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105.3 Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .115.4 Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125.5 Indices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .135.6 Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14

6. Appendix I: Revision Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15

TABLE OF CONTENTS

Page 3: ORACLE ENTERPRISE MANAGER PLUG-IN FOR PostgreSQL · PDF file2 Oracle Enterprise Manager Plug-in for PostgreSQL User Guide NOTE: This document supports the version of each product listed,

3 Oracle Enterprise Manager Plug-in for PostgreSQL User Guide

1. Platforms and Versions Supported

1.1 Oracle Enterprise Manager (OEM)

• Oracle Enterprise Manager Cloud Control 12c (12.1.0.3.0+)

• Oracle Enterprise Manager Cloud Control 13c (13.1.0.0.0+)

1.2 PostgreSQL

• PostgreSQL versions 9.0 – 9.4+

1.3 Oracle Management Agent (OMA) Operating Systems

• Microsoft Windows (64 bit) supported by the OMA

• Linux (64 bit) supported by the OMA

1.4 Oracle Management Server (OMS) Operating Systems

• All Oracle-supported OMS platforms

1.5 PostgreSQL Database Operating System

• All PostgreSQL-supported platforms (for remote monitoring)

2. Prerequisites

NOTE: Refer to: http://support.bluemedora.com/solution/articles/5000682950-prerequisites-guide-em-plugin-for-postgresql for more detailed information about the necessary prerequisites for this plug-in.

2.1 Monitoring Connectivity

• Create a PostgreSQL user, with permission to the databases to be monitored.

NOTE: For security, an administrative-level monitoring user (i.e., “super user”) is required to view the SQL text or queryid of queries executed by other users. A warning icon will be displayed on the plug-in’s home page if a read-only user is used. Tablespace data also requires an administrative-level monitoring user.

• Enable remote access for the new user

• Update the pg_hba.conf file to allow Enterprise Manager IP to remotely connect as the new user (Refer to: http://www.postgresql.org/docs/9.3/static/auth-pg-hba-conf.html)

2.2 PostgreSQL Monitoring Setup

• Enable statistics monitoring

• Verify pg_stat views are available in the “primary” database (Refer to: http://www.postgresql.org/docs/9.3/static/monitoring-stats.html)

• Install PostgreSQL SQL Statements extension

• Verify pg_stat_statements extension is installed (Refer to: http://www.postgresql.org/docs/9.3/static/pgstatstatements.html)

• Verify pg_stat_statements view is available in the “primary” database

NOTE: The “primary” database is the only location SQL statements statistics are collected from, since any location pg_stat_statements is queried from will return data about statements run in all databases.

WARNING: Ensure pg_stat_statements is viewable from the “primary” database, otherwise no query statistics will be collected.

Page 4: ORACLE ENTERPRISE MANAGER PLUG-IN FOR PostgreSQL · PDF file2 Oracle Enterprise Manager Plug-in for PostgreSQL User Guide NOTE: This document supports the version of each product listed,

4 Oracle Enterprise Manager Plug-in for PostgreSQL User Guide

3. Install and Configure the Plug-in

3.1 Importing the OPAR File

1. Log in to the emcli utility with the login command and enter the password when prompted:

emcli login -username=sysman

2. Ensure emcli is synchronized with the sync command:

emcli sync

3. View emcli configuration information with the status command:

emcli status

4. Import the OPAR file with the import update command:

emcli import_update -file=”<path to .opar file>” -omslocal

5. From Enterprise Manager, navigate to (Setup) Ò Extensibility Ò Self Update.

6. Click Check Updates.

7. Select the Plug-in folder from the Self Update page and confirm the PostgreSQL plug-in has been downloaded successfully. Refer to Figure 1.

Figure 1: Self Update Page

Page 5: ORACLE ENTERPRISE MANAGER PLUG-IN FOR PostgreSQL · PDF file2 Oracle Enterprise Manager Plug-in for PostgreSQL User Guide NOTE: This document supports the version of each product listed,

5 Oracle Enterprise Manager Plug-in for PostgreSQL User Guide

3.2 Deploying the Plug-in on a Management Server (OMS)

1. From Enterprise Manager, navigate to (Setup) Ò Extensibility Ò Plug-ins.

2. Expand the Databases folder and select the PostgreSQL plug-in.

3. From the Actions menu, select Deploy On Ò Management Servers.

4. Follow the on-screen instructions to complete the process.

Figure 2: Deploy on Management Server

Page 6: ORACLE ENTERPRISE MANAGER PLUG-IN FOR PostgreSQL · PDF file2 Oracle Enterprise Manager Plug-in for PostgreSQL User Guide NOTE: This document supports the version of each product listed,

6 Oracle Enterprise Manager Plug-in for PostgreSQL User Guide

3.3 Deploying the Plug-in on Management Agent (OMA)

1. From Enterprise Manager, navigate to (Setup) Ò Extensibility Ò Plug-ins.

2. Expand the Databases folder and select the PostgreSQL plug-in.

3. From the Actions menu, select Deploy On Ò Management Agent.

4. Follow the on-screen instructions to complete the process.

Figure 3: Deploy on Management Agent

Page 7: ORACLE ENTERPRISE MANAGER PLUG-IN FOR PostgreSQL · PDF file2 Oracle Enterprise Manager Plug-in for PostgreSQL User Guide NOTE: This document supports the version of each product listed,

7 Oracle Enterprise Manager Plug-in for PostgreSQL User Guide

4. Setting Up a Target

4.1 Adding Targets

1. From Enterprise Manager, navigate to (Setup) Ò Add Target Ò Add Targets Manually.

2. From the Add Targets Manually page, select Add Target Declaratively.

Figure 4: Add Targets Manually Page

3. Enter the host name. You can type it in or search for it by clicking on the magnifying glass.

4. Select ‘PostgreSQL Database’ for Target Type.

5. Click Add to specify target properties. Refer to Figure 6.

Figure 5: Add Target Declaratively Window

Page 8: ORACLE ENTERPRISE MANAGER PLUG-IN FOR PostgreSQL · PDF file2 Oracle Enterprise Manager Plug-in for PostgreSQL User Guide NOTE: This document supports the version of each product listed,

8 Oracle Enterprise Manager Plug-in for PostgreSQL User Guide

4.2 Specifying Target Properties

1. Enter the following information on the Add: PostgreSQL Database page:

TARGET PROPERTY DESCRIPTION

Database Hostname Host name of PostgreSQL server

Database Login Name Monitoring user name

Database Login Password Monitoring user password

Database Port PostgreSQL port number (default = 5432)

Primary Database The plug-in requires a “primary” database to connect to (default = ‘postgres’)

2. Click Test Connection to ensure Enterprise Manager can connect to the specified database.

3. Click OK to save your target.

Figure 6: Specify Target Properties

Page 9: ORACLE ENTERPRISE MANAGER PLUG-IN FOR PostgreSQL · PDF file2 Oracle Enterprise Manager Plug-in for PostgreSQL User Guide NOTE: This document supports the version of each product listed,

9 Oracle Enterprise Manager Plug-in for PostgreSQL User Guide

5. Monitoring Features

The Oracle Enterprise Manager Plug-in for PostgreSQL provides monitoring of nearly 200 key metrics for a PostgreSQL instance. Thresholds and metric history are available for each PostgreSQL instance, as well as advanced custom views of the instance and individual databases. These views present large amounts of complex data in an easy-to-consume manner, allowing the user to quickly identify database performance and configuration issues.

5.1 Overview

The Overview page provides insight into the overall health of the databases on the server.

• Target Status

• Monitoring Status

• Incidents

• Backends

• Replication

• Background Writer

Figure 7: Overview Page

Page 10: ORACLE ENTERPRISE MANAGER PLUG-IN FOR PostgreSQL · PDF file2 Oracle Enterprise Manager Plug-in for PostgreSQL User Guide NOTE: This document supports the version of each product listed,

10 Oracle Enterprise Manager Plug-in for PostgreSQL User Guide

5.2 Configuration

This page provides insight into current configurations of the database, including current, next boot, and reset values.

Figure 8: Configuration Page

Page 11: ORACLE ENTERPRISE MANAGER PLUG-IN FOR PostgreSQL · PDF file2 Oracle Enterprise Manager Plug-in for PostgreSQL User Guide NOTE: This document supports the version of each product listed,

11 Oracle Enterprise Manager Plug-in for PostgreSQL User Guide

5.3 Database

The Database page provides a per database view of connected backends, database growth, deadlocks as well as other useful metrics.

Figure 9: Database Page

Page 12: ORACLE ENTERPRISE MANAGER PLUG-IN FOR PostgreSQL · PDF file2 Oracle Enterprise Manager Plug-in for PostgreSQL User Guide NOTE: This document supports the version of each product listed,

12 Oracle Enterprise Manager Plug-in for PostgreSQL User Guide

5.4 Tables

The Tables page provides details on tables within a specific database. A breakdown of table size is given as well as top table metrics and graphs specific to the tables you are interested in.

Figure 10: Tables Page

Page 13: ORACLE ENTERPRISE MANAGER PLUG-IN FOR PostgreSQL · PDF file2 Oracle Enterprise Manager Plug-in for PostgreSQL User Guide NOTE: This document supports the version of each product listed,

13 Oracle Enterprise Manager Plug-in for PostgreSQL User Guide

5.5 Indices

The Indices page provides details into indices within a specific database and their size. Quickly being able to find and observe metric history for an index is one of the main features of this page.

Figure 11: Indices Page

Page 14: ORACLE ENTERPRISE MANAGER PLUG-IN FOR PostgreSQL · PDF file2 Oracle Enterprise Manager Plug-in for PostgreSQL User Guide NOTE: This document supports the version of each product listed,

14 Oracle Enterprise Manager Plug-in for PostgreSQL User Guide

5.6 Queries

The Queries page provides insight into a query’s current and historical performance.

Figure 12: Queries Page

Page 15: ORACLE ENTERPRISE MANAGER PLUG-IN FOR PostgreSQL · PDF file2 Oracle Enterprise Manager Plug-in for PostgreSQL User Guide NOTE: This document supports the version of each product listed,

15 Oracle Enterprise Manager Plug-in for PostgreSQL User Guide

6. Appendix I: Revision Notes

This user guide is updated with each release of the product, or when necessary. The following table provides its revision history.

REVISION DATE DESCRIPTION

REV-03 January 2017 • Noted in Prerequisites section that a PostgreSQL “super user” is required to collect both tablespace and query data.

REV-02 July 2016 • Updated Platforms and Versions Supported section to include Oracle Enterprise Manager Cloud Control 13c compatibility

• Updated Prerequisites section to include a support link and notes about pg_stat_statements

• Added Install and Configure the Plug-in section• Updated Setting Up a Target section to include detailed information about

how to add targets

REV-01 July 2015 Initial release.

Page 16: ORACLE ENTERPRISE MANAGER PLUG-IN FOR PostgreSQL · PDF file2 Oracle Enterprise Manager Plug-in for PostgreSQL User Guide NOTE: This document supports the version of each product listed,

Copyright © 2017 Blue Medora Inc. All rights reserved. U.S. and international copyright and intellectual property laws protect this product. Blue Medora is a registered trademark or trademark of Blue Medora in the United States and/or other jurisdictions.

PostgreSQL and the “Slonik” logo are trademarks of the PostgreSQL Community Association of Canada, and are used here with permission.

Blue Medora 3225 N Evergreen Dr. NE Suite 103 Grand Rapids, MI 49525

www.bluemedora.com

You can find the most up-to-date technical documentation on the Blue Medora support site at: http://support.bluemedora.com.

The Blue Medora website also provides the latest product updates. If you have comments about this documentation, submit your feedback to: [email protected].