pgX Quick Start
pgX is a powerful PostgreSQL monitoring and optimization Grafana app built into Base14 Scout. It provides deep visibility into every aspect of your PostgreSQL clusters.
What is pgX?​
pgX gives you complete visibility into your PostgreSQL infrastructure:
| Capability | What You Get |
|---|---|
| Health Monitoring | Real-time cluster health, connection status, and error rates |
| Query Analysis | Identify slow queries, analyze execution patterns, track response times |
| Table & Index Health | Monitor bloat, cache hit ratios, and vacuum status |
| Connection Management | Track pool utilization, idle connections, and connection patterns |
| Replication Monitoring | Monitor lag, standby health, and WAL generation |
| Lock Analysis | Detect deadlocks, blocking sessions, and wait events |
Prerequisites​
Before configuring pgX, you need to set up PostgreSQL metrics collection:
instances. Follow the PostgreSQL Advanced Monitoring guide to set up the pgdashex collector. :::
Configuration​
Step 1: Access pgX Configuration​
- Go to Administration → Plugins → pgX
- Click the Configuration tab
Step 2: Your PostgreSQL Deployment Type​
- Self-Hosted
- AWS RDS
- Google Cloud SQL
For PostgreSQL running on your own infrastructure (VMs, bare metal, Kubernetes).
No additional configuration required beyond the default settings.
For Amazon RDS for PostgreSQL, configure these additional settings:
| Setting | Description | Default |
|---|---|---|
| RDS Service Name | CloudWatch service name | aws-cloudwatch-stream |
| RDS Metrics Prefix | CloudWatch metric prefix | amazonaws.com/AWS/RDS/ |
| RDS Metrics Table | Table for RDS metrics | otel_metrics_summary |
| RDS Attribute Format | How dimensions are stored | nested |
For Google Cloud SQL for PostgreSQL.
Configure your Cloud SQL metrics integration in Scout to collect Cloud SQL specific metrics alongside PostgreSQL metrics.
Step 3: Select Your Environment​
Use the environment dropdown in pgX to filter metrics by environment. This
corresponds to the environment attribute set in your collector configuration.
Step 4: Verify Your Setup​
- Click the pgX icon in the Grafana sidebar
- Select your environment and cluster from the dropdowns
- Verify that metrics are appearing
What to Check:
- Health Status: Should show "UP" if PostgreSQL is reachable
- Connection Count: Should reflect current connections
- Database Size: Should show your database sizes
Available Sections​
pgX provides nine purpose-built sections:
| Section | Purpose | Guide |
|---|---|---|
| Overview | High-level cluster health and key metrics | Overview |
| Performance | Query and transaction performance analysis | Performance |
| Tables & Indexes | Table health, bloat, and index effectiveness | Tables & Indexes |
| Queries | Deep query-level analysis with filtering | Queries |
| Connections | Connection pool management and patterns | Connections |
| Replication | Replica health, lag, and WAL monitoring | Replication |
| Resources | Cloud resource metrics (RDS/Cloud SQL) | Resources |
| Locks & Waits | Concurrency analysis and deadlock detection | Locks & Waits |
| Maintenance | Vacuum, analyze, and maintenance tracking | Maintenance |
Related Guides​
- Overview - Start monitoring your cluster
- Performance - Analyze query performance
- Metrics Reference - Explore all available metrics
- Configuration Reference - All configuration options