Public Repository

Last pushed: 2 years ago
Short Description
Containerised pghero with cronified capture_query_stats
Full Description

This is a Docker container around the pghero opensource tool ( version 1.2.2. In addition to the main rails app it has an embedded cron to run the capture_query_stats.

The source for the Docker build is available at

Note that this historical visibility requires that a table be created in your DB with the following SQL statements:
CREATE TABLE "pghero_query_stats" ("id" serial primary key, "database" text, "query" text, "total_time" float, "calls" bigint, "captured_at" timestamp);
CREATE INDEX "index_pghero_query_stats_on_database_and_captured_at" ON "pghero_query_stats" ("database", "captured_at");

The container must be passed an environment variable for the DB in the following format:

Sample launch command:
docker run -e DATABASE_URL=postgres://test:test@ -p 8080:8080 jasonumiker/pghero

Docker Pull Command