Skip to content

Monitoring System

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

The built-in monitoring system provides metrics, logs, and alerting. Logs and alerts also support audit and traceability. It can monitor Pigsty-managed clusters, 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)
  • Other service modules (ETCD, MINIO/Silo, REDIS/Valkey, KAFKA, MYSQL, JUICE, VIBE, etc.)

Monitoring Scale and Counting Method

Pigsty v4.5.0’s dashboard directory and Victoria rule directory contain:

Source GroupDashboardsRecording RulesAlert Rules
PGSQL2940216
NODE1016316
INFRA1122
ETCD095
REDIS3966
MINIO / Silo205
KAFKA41915
MYSQL56827
APP200
Pigsty Overview100
Agent Liveness0140
Total6777392

Dashboards are counted as files/grafana/**/*.json files; ETCD dashboards reside in the INFRA directory. Recording and alert rules count record and alert entries in files/victoria/rules/*.yml, plus 14 liveness recording rules generated by the agent.yml template: 759 + 14 = 773. These are configuration counts shipped in the source. Deployed modules and settings determine what is actually loaded.

Raw exporter metrics and time-series counts vary with component versions, collectors, and monitored objects. Use the running scrape endpoints as the authority.


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 ways to add monitoring:

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

Was this page helpful?