Version v3.7.0 of the documentation is no longer actively maintained. The site that you are currently viewing is an archived snapshot.
For up-to-date documentation, see the latest version.
Modern observability stack with 3000+ metrics, 30+ dashboards, and enterprise-grade monitoring
Pigsty delivers unparalleled observability with a modern monitoring stack built on industry best practices.
Automatically monitor every component with 3000+ metrics, 30+ dashboards.
Note
Complete Insight: Monitor everything from high-level cluster health to individual table statistics. Get complete insight into the past, present, and future of your infrastructure.
Architecture Overview
Pigsty’s observability infrastructure leverages battle-tested open-source components in a cohesive, production-ready stack:
Grafana Visualization Engine
Dashboards with advanced interactive visualizations
Prometheus Metrics Database
Time-series storage with powerful query language
Loki Logging Platform
Centralized logging with label-based indexing
AlertManager
Alert aggregate, management and escalation
Service Architecture
Monitoring Dashboards
Multi-Level Dashboard Hierarchy
Pigsty provides 26+ PostgreSQL dashboards organized in a logical drill-down hierarchy:
Overview Level
# Global overview dashboardsdashboards:- Home:Global cluster overview and key metrics- INFRA:Infrastructure services status- NODES:Node-level resource utilization- Alert:Active alerts and notification status
Purpose: Rich, interactive visualizations for complex data analysis
Data Sources
# Extended data source supportgrafana_datasources:- infinity-datasource # REST API and file data sources- redis-datasource # Redis data source- clickhouse-datasource # ClickHouse integration- postgres-datasource # Enhanced PostgreSQL support
Purpose: Connect to diverse data sources beyond traditional metrics
Advantages: Flexible, lightweight, and highly configurable
Version Compatibility
# PostgreSQL version support matrixsupported_versions:- postgresql_9_6:legacy_metrics_set- postgresql_10:enhanced_metrics_set- postgresql_11:advanced_metrics_set- postgresql_12:modern_metrics_set- postgresql_13:extended_metrics_set- postgresql_14:latest_metrics_set- postgresql_15:cutting_edge_metrics_set- postgresql_16:next_gen_metrics_set
Benefit: Single exporter for heterogeneous PostgreSQL environments
Custom Queries
# Custom metric definition examplecustom_queries:pg_custom_business_metrics:query:| SELECT
schemaname,
tablename,
n_tup_ins as inserts_total,
n_tup_upd as updates_total,
n_tup_del as deletes_total
FROM pg_stat_user_tablesmetrics:- inserts_total:usage:COUNTERdescription:"Total number of inserts"- updates_total:usage:COUNTERdescription:"Total number of updates"
Pigsty v3.7 installs node_exporter on managed nodes and registers Node,
HAProxy, Keepalived, Nginx, Etcd, MinIO, Redis, PostgreSQL, PgBouncer, and
pgBackRest targets with Prometheus when the corresponding modules are
enabled. Component ports and switches are defined by the tagged role
defaults and documented on each module’s parameter page.
External Database Monitoring
Existing PostgreSQL instances and cloud RDS can be registered with
pgsql-monitor.yml. Supply a monitor connection URL with only the required
pg_monitor privileges; Pigsty registers pg_exporter and the Grafana
datasource without provisioning or changing that database.
Grafana can query both Prometheus metrics and PostgreSQL data. The bundled
dashboards use variables and URL links for drill-down navigation; ECharts
and other packaged plugins can visualize application or business data.
Low-Code Application Development
Grafana panels may be combined with PostgreSQL queries to build internal
operational views. This is a visualization capability, not a separate
Pigsty deployment module or application API.
Reusable Infrastructure
infra.yml can deploy INFRA independently from PGSQL. Nginx, DNSMasq,
Prometheus, AlertManager, Grafana, and Loki are controlled by their
documented *_enabled parameters, allowing Pigsty to reuse or coexist with
existing infrastructure.
Best Practices
Control metric cardinality and set retention according to available disk.
Back up Grafana configuration and keep alert notification channels tested.
Protect monitoring endpoints with access controls and HTTPS when exposed
outside the trusted network.
Monitor the monitoring stack itself and review storage growth regularly.
Limitations & Considerations
Prometheus and Loki in v3.7 are single-node services by default. Very large
metric cardinality, long retention, or complex dashboards require capacity
planning. External long-term storage and HA monitoring architectures are
manual integrations rather than built-in v3.7 modules.