Understanding Postgres Enterprise Manager components and architecture v8
Postgres Enterprise Manager (PEM) monitors and manages multiple Postgres servers through a single graphical interface. PEM can monitor the following areas of the infrastructure:
- Hosts — One or more servers (physical or virtual) and their operating systems.
- Database servers — One or more instances of PostgreSQL or EDB Postgres Advanced Server or EDB Postgres Extended Server (formerly known as 2ndQPostgres) running on a host.
- Databases — One or more databases and their schema objects, such as tables and indexes.
Note
The term Postgres refers to PostgreSQL, EDB Postgres Advanced Server, or EDB Postgres Extended Server.
PEM consists of individual software components:
- PEM server — The PEM server is the data repository for monitoring data and a server to which agents and clients connect. The PEM server consists of an instance of PostgreSQL, an associated database for storing monitoring data, and a server that provides web services.
- PEM agent — The PEM agent is responsible for executing tasks and reporting statistics from the agent host and the monitored Postgres instances to the PEM server. A single PEM agent can monitor multiple installed instances of Postgres that reside on one or many hosts.
- PEM web client — The PEM web interface allows you to manage and monitor Postgres servers and use PEM extended functionality. The web interface software is installed with the PEM server and is accessed using any supported web browser.
- SQL Profiler — SQL Profiler is a Postgres server plugin to record the monitoring data and query plans for the SQL Profiler tool to analyze in PEM. This is an optional component of PEM, but the plugin must be installed in each instance of Postgres for which you want to use it. You can use the SQL Profiler with any supported version of an EDB distribution of a PostgreSQL server or EDB Postgres Advanced Server, not just those managed through the PEM server. See SQL Profiler Configuration for details and supported versions.
PEM architecture
The following architectural diagram shows the relationships between the PEM server, clients, and managed and unmanaged Postgres servers.
PEM server
The PEM server consists of an instance of Postgres, an instance of the Apache web server providing web services to the client, and a PEM Agent. PEM uses a server-side cryptographic plugin to generate authentication certificates.
The instance of Postgres (a database server) and an instance of the Apache web-server HTTPD) can be on the same host or on separate hosts.
Postgres instance (database server) — This is the backend database server. It hosts a database named
pem
, which acts as the repository for PEM server. Thepem
database contains several schemas that store metric data collected from each monitored host, server, and database.pem
— This schema is the core of the PEM application. It contains the definitions of configuration functions, tables, or views required by the application.pemdata
— This schema stores the current snapshot of the monitored data.pemhistory
— This schema stores the historical monitored data.
Apache web server (HTTPD) — The PEM web application is deployed as a WSGI application with HTTPD to provide web services to the client. It is made up of the following:
- Web content presentation — The presentation layer is created by the web application (such as browser and login page).
- Rest API — The REST API allows integration with other apps and services.
- Database server administration/management