Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Database Tools
  3. PostgreSQL Metrics

PostgreSQL Metrics

Apache-2.0Pythonv0.3.3

A CLI tool that extracts PostgreSQL database and cluster metrics, outputting them as JSON or sending them via UDP.

GitHubGitHub
598 stars51 forks0 contributors

What is PostgreSQL Metrics?

Spotify PostgreSQL Metrics is a command-line tool that extracts detailed statistics and performance metrics from PostgreSQL databases. It operates as a one-time command or a long-running daemon to gather data on disk usage, transaction rates, index hit rates, replication delays, and more, helping monitor database health and performance. The tool outputs metrics in a Metrics 2.0 compatible JSON format or sends them via UDP to endpoints like FFWD for further processing.

Target Audience

Database administrators and DevOps engineers responsible for monitoring and maintaining PostgreSQL database clusters, particularly those needing actionable, cluster-wide and per-database metrics for proactive maintenance and performance tuning.

Value Proposition

Developers choose this tool for its comprehensive, standardized metrics extraction specifically tailored for PostgreSQL, including unique features like table bloat analysis and WAL file monitoring. It integrates easily with existing monitoring stacks via JSON output or UDP, and its extensible design allows adding custom metrics through Python modules.

Overview

Tool that extracts and provides metrics on your PostgreSQL database

Use Cases

Best For

  • Monitoring PostgreSQL database disk usage and identifying storage inefficiencies like table bloat due to MVCC.
  • Tracking transaction rates and rollbacks per second to assess database performance and stability.
  • Analyzing index hit rates versus sequential scans to optimize query performance and indexing strategies.
  • Measuring replication delays in bytes for each slave to ensure data consistency and high availability.
  • Monitoring client connection counts and lock statistics to detect contention and plan for connection pooling.
  • Preventing disk filling issues by tracking WAL file amounts and ensuring proper archiving processes.

Not Ideal For

  • Environments using non-Debian Linux distributions or without systemd, due to packaging and service management dependencies.
  • Teams seeking quick, out-of-the-box monitoring with minimal setup, as it requires manual database preparation and complex configuration editing.
  • High-traffic production databases where overhead from resource-intensive metrics like table bloat could degrade performance.

Pros & Cons

Pros

Comprehensive Metric Suite

Covers unique PostgreSQL-specific metrics like table bloat analysis and WAL file monitoring, providing deep insights into database health and performance, as detailed in the metrics explanation section.

Extensible Architecture

Allows users to add custom metrics by modifying Python modules, as explained in the 'How to Add More Metrics' section, making it adaptable to specific monitoring needs.

Standardized Output Format

Outputs metrics in Metrics 2.0 compatible JSON, facilitating easy integration with existing monitoring stacks, mentioned in the default metrics format description.

Actionable Cluster-wide Insights

Provides both per-database and global metrics, such as replication delays and lock statistics, aiding in proactive maintenance and tuning, aligned with the project's philosophy.

Cons

Resource-Intensive Metrics

The table bloat metric is admitted to be 'rather heavy' and may need disabling to avoid performance issues, as noted in the README, limiting its use in sensitive environments.

Complex Initial Setup

Requires building Debian packages, editing multiple configuration files, preparing the database with admin access, and modifying pg_hba.conf, making deployment cumbersome and error-prone.

Platform-Specific Packaging

Primarily supports Debian-based distributions with systemd, as stated in prerequisites, limiting usability in other environments like RHEL or containerized setups without additional work.

Frequently Asked Questions

Quick Stats

Stars598
Forks51
Contributors0
Open Issues2
Last commit3 years ago
CreatedSince 2015

Tags

#database-monitoring#metrics-collection#cli-tool#system-metrics#python#json-output#postgresql#performance#udp

Built With

D
Debian
P
Python
s
systemd

Included in

PostgreSQL11.8kDatabase Tools5.1k
Auto-fetched 1 day ago

Related Projects

Hasura GraphQL EngineHasura GraphQL Engine

Blazing fast, instant realtime GraphQL APIs on all your data with fine grained access control, also trigger webhooks on database events.

Stars31,967
Forks2,880
Last commit1 day ago
PostgRESTPostgREST

REST API for any Postgres database

Stars27,128
Forks1,196
Last commit2 days ago
Telegraf PostgreSQL pluginTelegraf PostgreSQL plugin

Agent for collecting, processing, aggregating, and writing metrics, logs, and other arbitrary data.

Stars17,496
Forks5,804
Last commit2 days ago
PostGraphilePostGraphile

🔮 Graphile's Crystal Monorepo; home to Grafast, PostGraphile, pg-introspection, pg-sql2 and much more!

Stars12,923
Forks619
Last commit2 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub