Sign inSign up

infrayantra/pg_analyzer

By infrayantra

•Updated 16 days ago

Web-based PostgreSQL log analyzer GUI developed by InfraYantra Labs

Image
Developer tools
Databases & storage
Monitoring & observability
0

53

infrayantra/pg_analyzer repository overview

⁠BadgerScope (pg_analyzer)

A self-contained web GUI for analyzing PostgreSQL server logs with pgBadger⁠, the full-featured PostgreSQL log analyzer. Upload log files or point the container at a mounted log directory, and get a complete HTML performance report without touching the command line.

⁠Features

  • Web GUI built with FastAPI: upload logs or select from a mounted directory, no CLI needed
  • Supports all pgBadger log formats: stderr, csvlog, jsonlog, syslog, syslog2, logplex, rds, redshift
  • Background job processing with live status polling
  • Report history with a built-in viewer and delete option
  • Incremental mode for building rolling multi-day reports
  • Health check endpoint for container orchestration

⁠Quick start

docker run -d --name pg_analyzer -p 8080:8080 \
  -v /path/to/postgresql/logs:/data/logs:ro \
  -v pg_analyzer_reports:/data/reports \
  -v pg_analyzer_uploads:/data/uploads \
  infrayantra/pg_analyzer:latest

Then open http://localhost:8080⁠ in a browser.

⁠Volumes

PathPurpose
/data/logsMount your PostgreSQL log directory here, read-only
/data/reportsGenerated pgBadger HTML reports
/data/uploadsTemporary storage for uploaded log files (auto-cleaned)
/data/incrementalState for incremental report mode

⁠Environment variables

VariableDefaultDescription
LOG_DIR/data/logsMounted log directory
REPORT_DIR/data/reportsWhere reports are written
UPLOAD_DIR/data/uploadsTemp upload storage
INCREMENTAL_DIR/data/incrementalIncremental mode state
TZUTCContainer timezone for log parsing

⁠Port

  • 8080: web GUI

⁠Health check

  • GET /healthz returns {"status": "ok"}

⁠Notes

This image runs without authentication by default. PostgreSQL logs can contain query text and connection details, so restrict network access (VPN, reverse proxy, firewall) if deploying beyond a trusted local environment.

Tag summary

Content type

Image

Digest

sha256:86999f4de…

Size

71.7 MB

Last updated

16 days ago

docker pull infrayantra/pg_analyzer