Public Repository

Last pushed: a month ago
Short Description
Crunchy Collect provides realtime metrics about the container and PostgreSQL containers.
Full Description

Crunchy Collect

The Crunchy Collect docker image contains the following packages:

  • Node Exporter
  • PostgreSQL Exporter

Start Collect Instance

The following starts a PostgreSQL, Collect and Prometheus containers:

docker network create --driver bridge pgnet

docker run \
    --name=primary \
    --hostname=primary \
    --publish=5432:5432 \
    --network="pgnet" \
    --env=PG_MODE=primary \
    --env=PG_PRIMARY_USER=primaryuser \
    --env=PG_PRIMARY_PASSWORD=password \
    --env=PG_PRIMARY_HOST=primary \
    --env=PG_PRIMARY_PORT=5432 \
    --env=PG_DATABASE=userdb \
    --env=PG_USER=testuser \
    --env=PG_PASSWORD=password \
    --env=PG_ROOT_PASSWORD=password \
    --detach crunchydata/crunchy-postgres:centos7-10.3-1.8.2

docker run \
    --name=collect \
    --network="pgnet" \
    --publish=9187:9187 \
    --publish=9100:9100 \
    --env=DATA_SOURCE_NAME=postgresql://testuser:password@primary:5432/postgres?sslmode=disable \
    --detach crunchydata/crunchy-collect:centos7-10.3-1.8.2

docker run \
    --name=prometheus \
    --hostname=prometheus \
    --network="pgnet" \
    --publish=9090:9090 \
    --env=COLLECT_HOST=collect \
    --env=SCRAPE_INTERVAL=5s \
    --env=SCRAPE_TIMEOUT=5s \
    --detach crunchydata/crunchy-prometheus:centos7-10.3-1.8.2

Using Collect

To view node metrics, in a web browser, navigate to:

To view postgres metrics, in a web browser, navigate to:

To explore metrics in Prometheus, in a web browser, navigate to:

Environment Variables

See the official documentation for a list of environment variables available for this container.

More Examples

For more examples, see the official Crunchy Containers GitHub repository.

Docker Pull Command