back to downloads

pgBadger

Performance analysis and insights for PostgreSQL queries

4.7.0
linux
amd64
View pgBadger documentation

Step 1

Create a network so that the PostgreSQL and pgBadber containers can communicate with each other:

docker network create --driver bridge pgnetwork

Step 2

Set up key environmental variables for working with both of the containers. This creates a user named hippo with a password of datalake that has access to a database named hippo:

cat << EOF > postgres-env.list
PG_MODE=primary
PG_PRIMARY_USER=postgres
PG_PRIMARY_PASSWORD=datalake
PG_DATABASE=hippo
PG_USER=hippo
PG_PASSWORD=datalake
PG_ROOT_PASSWORD=datalake
PG_PRIMARY_PORT=5432
EOF

Step 3

Run the containers:

docker run --publish 5432:5432 \
  --volume=postgres:/pgdata \
  --env-file=postgres-env.list \
  --name="postgres" \
  --hostname="postgres" \
  --network="pgnetwork" \
  --detach \
registry.developers.crunchydata.com/crunchydata/crunchy-postgres:centos8-13.3-4.7.0


docker run \
  -p 10000:10000 \
  -v postgres:/pgdata:ro \
  -v report:/report \
  --env=BADGER_TARGET='postgres' \
  --env=BADGER_CUSTOM_OPTS='--incremental --prefix="%t [%p]: [%l-1] user=%u,db=%d,app=%a,client=%h"' \
  --network=pgnetwork \
  --name='pgbadger' \
  --hostname='pgbadger' \
  -d registry.developers.crunchydata.com/crunchydata/crunchy-pgbadger:centos8-13.3-4.7.0

Step 4

Go to http://localhost:10000 in your local browser. You can view the pgBadger report here. As you perform more queries on your database, you will see more information in the report.

TAGS:

4.7.0

docker pull registry.developers.crunchydata.com/crunchydata/crunchy-pgbadger:centos8-12.7-4.7.0
COMPRESSED SIZE: 606.44 MB

4.7.0

docker pull registry.developers.crunchydata.com/crunchydata/crunchy-pgbadger:centos8-13.3-4.7.0
COMPRESSED SIZE: 606.44 MB

4.6.3

docker pull registry.developers.crunchydata.com/crunchydata/crunchy-pgbadger:centos8-13.3-4.6.3
COMPRESSED SIZE: 549.88 MB

4.6.3

docker pull registry.developers.crunchydata.com/crunchydata/crunchy-pgbadger:centos8-12.7-4.6.3
COMPRESSED SIZE: 549.88 MB

4.6.2

docker pull registry.developers.crunchydata.com/crunchydata/crunchy-pgbadger:centos8-13.2-4.6.2
COMPRESSED SIZE: 523.36 MB

4.6.2

docker pull registry.developers.crunchydata.com/crunchydata/crunchy-pgbadger:centos8-12.6-4.6.2
COMPRESSED SIZE: 523.36 MB

4.6.1

docker pull registry.developers.crunchydata.com/crunchydata/crunchy-pgbadger:centos8-13.2-4.6.1
COMPRESSED SIZE: 516.73 MB

4.6.1

docker pull registry.developers.crunchydata.com/crunchydata/crunchy-pgbadger:centos8-12.6-4.6.1
COMPRESSED SIZE: 516.73 MB

4.6.0

docker pull registry.developers.crunchydata.com/crunchydata/crunchy-pgbadger:centos8-12.5-4.6.0
COMPRESSED SIZE: 516.58 MB

4.6.0

docker pull registry.developers.crunchydata.com/crunchydata/crunchy-pgbadger:centos8-13.1-4.6.0
COMPRESSED SIZE: 516.58 MB

4.5.3

docker pull registry.developers.crunchydata.com/crunchydata/crunchy-pgbadger:centos8-12.7-4.5.3
COMPRESSED SIZE: 607.17 MB

4.5.3

docker pull registry.developers.crunchydata.com/crunchydata/crunchy-pgbadger:centos8-13.3-4.5.3
COMPRESSED SIZE: 607.17 MB