Documentation Index
Fetch the complete documentation index at: https://private-7c7dfe99-page-updates.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Monitoring PostgreSQL Metrics with ClickStack
TL;DRMonitor PostgreSQL performance metrics in ClickStack using the OTel PostgreSQL receiver. Includes a demo dataset and pre-built dashboard.
Integration with existing PostgreSQL
This section covers configuring your existing PostgreSQL installation to send metrics to ClickStack by configuring the ClickStack OTel collector with the PostgreSQL receiver. If you would like to test the PostgreSQL metrics integration before configuring your own existing setup, you can test with our preconfigured demo dataset in the following section.- ClickStack instance running
- Existing PostgreSQL installation (version 9.6 or newer)
- Network access from ClickStack to PostgreSQL (default port 5432)
- PostgreSQL monitoring user with appropriate permissions
Ensure monitoring user has required permissions
The PostgreSQL receiver requires a user with read access to statistics views. Grant thepg_monitor role to your monitoring user:Create custom OTel collector configuration
ClickStack allows you to extend the base OpenTelemetry collector configuration by mounting a custom configuration file and setting an environment variable.Createpostgres-metrics.yaml:The
tls: insecure: true setting disables SSL verification for development/testing. For production PostgreSQL with SSL enabled, remove this line or configure proper certificates.Verify metrics collection
Once configured, log into HyperDX and verify metrics are flowing:- Navigate to the Metrics explorer
- Search for metrics starting with postgresql. (e.g., postgresql.backends, postgresql.commits)
- You should see metric data points appearing at your configured collection interval
Demo dataset
For users who want to test the PostgreSQL metrics integration before configuring their production systems, we provide a pre-generated dataset with realistic PostgreSQL metrics patterns.Database-level metrics onlyThis demo dataset includes database-level metrics only to keep the sample data lightweight. Table and index metrics are collected automatically when monitoring a real PostgreSQL database.
Download the sample metrics dataset
Download the pre-generated metrics files (24 hours of PostgreSQL metrics with realistic patterns):- Morning connection spike (08:00) - Login rush
- Cache performance issue (11:00) - Blocks_read spike
- Application bug (14:00-14:30) - Rollback rate spikes to 15%
- Deadlock incidents (14:15, 16:30) - Rare deadlocks
Start ClickStack
Start a ClickStack instance:Verify metrics in HyperDX
Once loaded, the quickest way to see your metrics is through the pre-built dashboard.Proceed to the Dashboards and visualization section to import the dashboard and view many PostgreSQL metrics at once.Timezone DisplayHyperDX displays timestamps in your browser’s local timezone. The demo data spans 2025-11-10 00:00:00 - 2025-11-11 00:00:00 (UTC). Set your time range to 2025-11-09 00:00:00 - 2025-11-12 00:00:00 to ensure you see the demo metrics regardless of your location. Once you see the metrics, you can narrow the range to a 24-hour period for clearer visualizations.
Dashboards and visualization
To help you get started monitoring PostgreSQL with ClickStack, we provide essential visualizations for PostgreSQL metrics.the dashboard configuration
Import the pre-built dashboard
- Open HyperDX and navigate to the Dashboards section
- Click Import Dashboard in the upper right corner under the ellipses
- Upload the
postgres-metrics-dashboard.jsonfile and click Finish Import
View the dashboard
The dashboard will be created with all visualizations pre-configured:For the demo dataset, set the time range to 2025-11-10 00:00:00 - 2025-11-11 00:00:00 (UTC) (adjust based on your local timezone). The imported dashboard won’t have a time range specified by default.
Troubleshooting
Custom config not loading
Verify the environment variable is set:No metrics appearing in HyperDX
Verify PostgreSQL is accessible:Authentication errors
Verify password is set correctly:Next steps
- Set up alerts for critical thresholds (connection limits, high rollback rates, low cache hit ratios)
- Enable query-level monitoring with
pg_stat_statementsextension - Monitor multiple PostgreSQL instances by duplicating the receiver configuration with different endpoints and service names