prometheus-postgresql-adapter
by
timescale

Description: Use PostgreSQL as a remote storage database for Prometheus

View on GitHub ↗

Summary Information

Updated 59 minutes ago
Added to GitGenius on April 8th, 2021
Created on July 18th, 2017
Open Issues & Pull Requests: 35 (+0)
Number of forks: 67
Total Stargazers: 336 (+0)
Total Subscribers: 4 (+0)

Issue Activity (beta)

Open issues: 32
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 2,492 days
Stale 30+ days: 32
Stale 90+ days: 32

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • bug (11)
  • question (9)
  • enhancement (7)
  • help wanted (4)
  • Documentation (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

The prometheus-postgresql-adapter is a remote storage adapter that enables Prometheus to use PostgreSQL as a long-term storage backend for time-series metrics. Written in Go, this project bridges the gap between Prometheus's monitoring capabilities and PostgreSQL's robust database infrastructure, allowing organizations to persist metrics beyond Prometheus's default retention window.

The adapter functions as an integration layer that accepts metrics from Prometheus and writes them to PostgreSQL. To operate, it requires the pg_prometheus extension for PostgreSQL as a mandatory dependency. TimescaleDB, Timescale's time-series database extension for PostgreSQL, is listed as an optional dependency that provides improved performance and scalability characteristics when deployed alongside the adapter.

The project provides multiple deployment options to accommodate different infrastructure preferences. Pre-built binaries are available through the GitHub releases page for direct installation. For containerized environments, the adapter is distributed as a Docker image on Docker Hub under timescale/prometheus-postgresql-adapter. Timescale also provides a complementary Docker image that packages PostgreSQL, pg_prometheus, and TimescaleDB together, simplifying the setup process for users who want an integrated solution.

Configuration of the adapter involves modifying the prometheus.yml file to specify remote storage endpoints and credentials. The adapter supports both command-line flags and environment variables for configuration, with all environment variables prefixed with TS_PROM. This dual configuration approach provides flexibility for different deployment scenarios, whether running the adapter directly or within containerized orchestration systems.

The adapter includes built-in support for metric filtering through Prometheus's write_relabel_configs feature. This allows operators to selectively exclude metrics from being sent to PostgreSQL storage, reducing database storage consumption and improving query performance. For example, users can filter out Go runtime metrics that are typically less valuable for long-term analysis.

It is important to note that this project has been superseded by Promscale, a more advanced solution from Timescale that offers additional capabilities including automatic partitioning, native compression with typical storage savings around 95 percent, native data retention policies, and support for both SQL and PromQL query languages. The prometheus-postgresql-adapter repository continues in maintenance mode only, with active development having shifted to the Promscale project.

The project is released under the Apache 2 Open Source License and welcomes community contributions. Contributors are required to sign a Contributor License Agreement before their contributions can be accepted. The repository maintains connections with other significant open-source projects through overlapping contributors, including relationships with timescale/timescaledb, flutter/flutter, and angular/angular, indicating its integration within a broader ecosystem of development tools and infrastructure projects.

prometheus-postgresql-adapter
by
timescaletimescale/prometheus-postgresql-adapter

Repository Details

Fetching additional details & charts...