Skip to main content

Monitor projects in the Putki stack

If you run the full Putki stack with Docker Compose, execution monitoring is already part of it. The stack includes the grafana service with the same datasource and dashboards as the monitoring bundle, and the warehouse-db service holds the logging database. You do not need the monitoring bundle.

Grafana listens on port 3000 of the stack host, bound to 127.0.0.1 unless you set BIND_ADDR. Log in as admin with the GRAFANA_ADMIN_PASSWORD from the stack's .env.

Connect your own projects​

The putki-lab sample project logs out of the box. For each of your own projects, run the installer from the monitoring bundle against the project folder on the host:

./install-logging.sh --project-home /path/to/projects/sales --project-name sales \
--environment-file /path/to/projects/sales/environments/prod.json \
--logging-password '<logging password>'

The logging password is LOGGING_DB_PASSWORD from the stack's .env, or WAREHOUSE_DB_PASSWORD if that is not set.

The installer's defaults for the rest are the Putki stack's values: host warehouse-db, port 5432, user developer. Accept them when it asks, or add --no-prompt to use them without asking. If you set LOGGING_DB_HOST or LOGGING_DB_USER in the stack's .env, pass the same values with --logging-host and --logging-user.

Run the bundle's Grafana against the stack​

Only if you run the stack without its grafana service: the bundle can join the stack's network and read warehouse-db directly. In the bundle's .env, remove COMPOSE_PROFILES=logging-db and set:

LOGGING_DB_HOST=warehouse-db
LOGGING_DB_USER=developer
LOGGING_DB_PASSWORD=<the stack's WAREHOUSE_DB_PASSWORD>

Then start it with the join overlay. The stack must be running first, because the overlay attaches to its network:

docker compose -f docker-compose-monitoring.yml -f docker-compose-monitoring.join.yml up -d

Set PUTKI_NETWORK if your stack's network is not called putki-net.