Skip to main content

Execution monitoring reference

Requirements​

Apache Hop2.x, in Putki or Apache Hop. Tested with 2.18 and 2.19
PostgreSQL12 or later. The bundle runs 16
Docker Compose2.20 or later, for the bundled stack
Grafana10 or later, for your own Grafana. The bundle runs 13.1
jqFor install-logging.sh --environment-file

Bundle contents​

PathWhat it is
docker-compose-monitoring.ymlGrafana, the optional PostgreSQL, and the one-off schema job
docker-compose-monitoring.join.ymlOverlay that attaches to an existing Putki stack's network
.env.exampleTemplate for .env, the only file you edit
install-logging.shInstalls the Hop side into a project
hop/The logging pipelines and metadata the installer copies
sql/init-logging.sqlThe schema. Idempotent: creates and migrates, never deletes
grafana/datasources/datasources.ymlThe logging datasource, configured from environment variables
grafana/dashboards/The two dashboards and their provider definition
VERSIONThe bundle version, for support requests

.env settings​

SettingDefaultMeaning
GRAFANA_ADMIN_PASSWORDrequiredPassword of Grafana's admin user, applied on first start only
LOGGING_DB_PASSWORDrequiredPassword of the logging database user
COMPOSE_PROFILESlogging-dbRemove to use your own PostgreSQL instead of the bundled one
LOGGING_DB_HOSTlogging-dbHost of the logging database, as Grafana sees it
LOGGING_DB_PORT5432Port of the logging database, as Grafana sees it
LOGGING_DB_NAMEloggingDatabase name. Hop always writes to logging
LOGGING_DB_USERhop_loggingDatabase user
LOGGING_DB_SSLMODEdisablerequire or verify-full for a remote database
LOGGING_DB_PUBLISHED_PORT5432Host port of the bundled database, for Hop outside Docker
LOGGING_DB_BIND_ADDR127.0.0.1Interface the bundled database listens on
GRAFANA_PORT3000Host port of Grafana
GRAFANA_BIND_ADDR127.0.0.1Interface Grafana listens on
GRAFANA_ROOT_URLhttp://localhost:3000/Public URL, when behind a proxy
GRAFANA_SERVE_FROM_SUB_PATHfalsetrue when the public URL has a path
GRAFANA_COOKIE_SECUREfalsetrue when served over HTTPS
GRAFANA_ANONYMOUSfalsetrue for read-only access without login
GRAFANA_EXPLORE_ENABLEDfalsetrue to allow ad-hoc SQL in Explore
GRAFANA_THEMElightDefault theme for new users
MONITORING_NETWORKputki-monitoringName of the Docker network the stack creates
PUTKI_NETWORKputki-netWith the join overlay: the Putki stack's network
COMPOSE_PROJECT_NAMEputki-monitoringNames the containers and data volumes

install-logging.sh options​

OptionMeaning
--project-home DIRRequired. The Hop project folder, containing project-config.json
--project-name NAMEWritten to every run and listed in the dashboard's Project filter
--environment-file FILEHop environment file to add the LOGGING_* variables to. Repeatable
--logging-host HOSTLOGGING_HOSTNAME. Default warehouse-db
--logging-port PORTLOGGING_PORT. Default 5432
--logging-user USERLOGGING_USERNAME. Default developer
--logging-password VALUELOGGING_PASSWORD, plain or in Hop's Encrypted … form
--no-promptNever ask; use the defaults for anything not given
--no-clobberKeep existing copies of the installed files
--dry-runReport what would change, change nothing

The defaults are the Putki compose stack's values. Run in a terminal, the installer asks for any LOGGING_* value you did not pass; otherwise it uses the default and says so. It never changes a variable that is already in the environment file, and re-running it reports files as unchanged.

It installs five files into the project:

FileRole
logging/pipeline-log.hplRuns at the start and end of every pipeline; records it and its transforms
logging/workflow-log.hplThe same for workflows and their actions
metadata/rdbms/logging.jsonThe logging database connection, built from the variables below
metadata/pipeline-log/pipeline-log.jsonTells Hop to run pipeline-log.hpl
metadata/workflow-log/workflow-log.jsonTells Hop to run workflow-log.hpl

Hop variables​

VariableMeaning
LOGGING_HOSTNAMEHost of the logging database, as Hop sees it
LOGGING_PORTPort of the logging database
LOGGING_USERNAMEDatabase user; needs SELECT, INSERT and UPDATE on both tables
LOGGING_PASSWORDIts password. The Encrypted … form is obfuscation, not encryption
PROJECT_NAMEInformational. The name written to each run is set in the pipelines at install time

All four LOGGING_* variables must be defined in the environment a project runs under.

Tables​

log_object: one row per workflow, pipeline, action and transform run.

ColumnTypeMeaning
channel_idvarchar(36)Hop's unique ID for the run. Primary key
parent_channel_idvarchar(36)The run that started this one; empty for a top-level run
namevarchar(255)Workflow, pipeline, action or transform name
statusvarchar(32)Hop's status text, such as Finished or Stopped (with errors)
start_date, end_datetimestamptzWhen the run started and ended
typetextWORKFLOW, PIPELINE, ACTION or TRANSFORM
rows_processedintegerRows written by the transform, or by the pipeline or workflow as a whole
time_processedintegerDuration in seconds
svgvarcharRendered image of the workflow or pipeline
projectvarchar(255)The --project-name it was installed with

log_detail: the log text of a run, for rows that produced any. channel_id references log_object and is deleted with it.

Dashboards​

Putki monitoring (putki-monitoring). Filters: Project and the time range.

PanelShows
Total runs, Success, Failed, Success %Top-level workflows started in the time range: those not started by another workflow. Failed counts every one whose status is not Finished, including runs still in progress
VolumeSum of rows_processed per day over every recorded row: workflows, pipelines, actions and transforms. A row that passes through several transforms is counted once for each
Time processedSeconds of run time per day
Failed, SuccessTop-level workflow and pipeline runs with status Stopped (with errors) or Finished. Click a name to open its log

Execution log detail (putki-log-detail). The log of one run, opened from either table.

Both are provisioned: Grafana restores the shipped version when it restarts. Save a copy under a new name to customise one.