Monitoring System

How Pigsty’s monitoring system is architected and how monitored targets are automatically managed.

Pigsty’s monitoring system has three pillars—metrics, logs, and alerting—and is available out of the box. Logs and alerts are also important inputs for audit and traceability. It can monitor clusters managed by Pigsty, existing PostgreSQL clusters, and external RDS services.


Monitoring Targets

Pigsty monitoring covers these core targets:

  • PostgreSQL clusters and instances (SQL performance, connections, replication, transactions, checkpoints, WAL)
  • Infrastructure components (Grafana, VictoriaMetrics, Alertmanager, Nginx, etc.)
  • Host nodes (CPU, memory, disk, network, kernel)
  • Key middleware (ETCD, MINIO, REDIS, FERRET, JUICE, VIBE, etc.)

Technology Stack

ComponentPurpose
GrafanaVisualization dashboards, unified entry point, alert views
VictoriaMetricsTime-series metric ingestion, storage, and query
VictoriaLogsStructured log ingestion, indexing, and search
VMAlert + AlertmanagerAlert rule evaluation and notification delivery
Exporter / AgentDatabase/system metric exposure and log forwarding

Onboarding Modes

Pigsty supports three monitoring onboarding modes:

ModeUse CaseEntry
FULLDatabase is deployed and managed directly by PigstyPGSQL Monitoring System
MANAGEDExisting PostgreSQL cluster with SSH-manageable nodesMonitor Existing Cluster
RDSCloud database accessible only by connection stringMonitor RDS

Continue Reading