Architecture Overview
PMP4PG follows a distributed agent-based architecture with a centralized backend and a web-based frontend. Each component has a well-defined role and communicates over standard HTTP/REST APIs.
High-Level Architecture
┌──────────────────────────────────────────────────────────────────┐
│ Monitored Infrastructure │
│ │
│ ┌────────────────┐ ┌────────────────┐ ┌────────────────┐ │
│ │ PostgreSQL │ │ PostgreSQL │ │ PostgreSQL │ │
│ │ Server A │ │ Server B │ │ Server C │ │
│ │ │ │ │ │ │ │
│ │ ┌────────────┐ │ │ ┌────────────┐ │ │ ┌────────────┐ │ │
│ │ │ PMP Agent │ │ │ │ PMP Agent │ │ │ │ PMP Agent │ │ │
│ │ │ (Go) │ │ │ │ (Go) │ │ │ │ (Go) │ │ │
│ │ └─────┬──────┘ │ │ └─────┬──────┘ │ │ └─────┬──────┘ │ │
│ └───────┼────────┘ └───────┼────────┘ └───────┼────────┘ │
└──────────┼───────────────────┼───────────────────┼─────────────┘
│ │ │
│ REST API (HTTPS) │
└───────────────────┼───────────────────┘
│
▼
┌──────────────────────────────────────────────────────────────────┐
│ PMP4PG Backend │
│ Java / Spring Boot │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────────────┐ │
│ │ Metrics │ │ AWR │ │ REST API │ │
│ │ Ingestion │ │ Snapshot │ │ (Controllers / │ │
│ │ Layer │ │ Engine │ │ Managers / DAOs) │ │
│ └──────────────┘ └──────────────┘ └──────────────────────┘ │
└──────────────────────────────┬───────────────────────────────────┘
│
┌───────────────┴────────────────┐
│ │
▼ ▼
┌──────────────────────────┐ ┌───────────────────────────────┐
│ PMP Repository │ │ PMP4PG Frontend │
│ PostgreSQL │ │ Angular + PrimeNG │
│ (+ TimescaleDB) │ │ │
│ │ │ pmp.data-resilience.fr │
│ · Live tables (ASH) │ │ │
│ · History tables (AWR) │ │ · Global Dashboard │
│ · Reference tables │ │ · ASH Viewer │
└──────────────────────────┘ │ · AWR Viewer │
│ · Trends │
│ · Server Management │
└───────────────────────────────┘
Components
PMP Agent (Go)
A lightweight binary deployed on each monitored PostgreSQL server. The agent:
- Connects locally to the PostgreSQL instance via
pg_stat_*views - Collects metrics at configurable intervals (every 2s for ASH, every minute for deltas)
- Sends collected data to the PMP4PG Backend via REST API
- Handles its own registration and authentication with the central platform
- Compresses payloads with gzip to minimize network usage
- Retries automatically on transient network failures
The agent runs as a system service and is configured via a single config.yml file.
PMP4PG Backend (Java / Spring Boot)
The central server responsible for:
- Metrics ingestion — Receiving and persisting all data sent by agents
- AWR Snapshot Engine — Automatically generating numbered snapshots every 30 minutes by aggregating live metrics into history tables
- REST API — Serving all data to the frontend (servers, snapshots, ASH data, AWR reports, trends, alerts, users)
- Business logic — Validation, aggregation, delta computation
The backend follows a strict layered architecture:
Controller → input validation + routing
Manager → all business logic and orchestration
DAO → data access (injected only in Managers)
PMP Repository (PostgreSQL + TimescaleDB)
The central data store, organized into three categories of tables:
| Table Category | Purpose | Retention |
|---|---|---|
| Live tables | Raw ASH samples, real-time metrics | Short-term (purged automatically) |
History tables (*_history) | AWR snapshot aggregates | Long-term (configurable) |
| Reference tables | Servers, agents, sites, hosts, users | Permanent |
TimescaleDB hypertables are used where applicable for efficient time-series storage and querying.
PMP4PG Frontend (Angular + PrimeNG)
A single-page web application served at pmp.data-resilience.fr.
- Built with Angular and PrimeNG component library
- Communicates exclusively with the backend REST API
- No direct database access from the browser
- Responsive UI with chart-rich pages (timeline, bar charts, line charts, data tables)
Data Flow
Real-Time Path (ASH)
PostgreSQL pg_stat_activity
↓ (every 2 seconds)
PMP Agent
↓ (REST POST, gzip)
Backend — Metrics Ingestion
↓
Live ASH table
↓
Frontend ASH Viewer (polling every 5s–60s)
Proactive Path (AWR)
Live metric tables (accumulated over 30 min)
↓ (Backend AWR Snapshot Engine, every 30 min)
*_history tables (numbered snapshot)
↓
Frontend AWR Viewer (user selects begin + end snapshot)
↓
AWR Report rendered + exported as HTML
Security Considerations
- Agent-to-backend communication uses API key authentication
- Each agent has a unique API key generated at registration time
- The backend validates all incoming requests before processing
- The frontend requires user authentication (login) to access the platform
Next Steps
- Learn Who PMP4PG is for →
- Check Prerequisites →
- Install the Platform →