Monitoring configuration¶
Monitoring is configured by two top-level blocks in lhp.yaml: event_log
(inject an event-log table into every generated pipeline) and monitoring
(build a pipeline that consolidates and summarizes those event logs). String
fields support ${token} substitution from substitutions/<env>.yaml.
When monitoring is enabled, lhp generate emits three artifacts: a union
notebook (monitoring/<env>/union_event_logs.py), a materialized-views-only
pipeline (generated/<env>/<pipeline_name>/monitoring.py), and a Databricks
job (resources/<pipeline_name>.job.yml — written directly under
resources/, not a resources/lhp/ subdirectory).
See also
How-to guide: Monitor every pipeline from one place.
Event log fields¶
The event_log block. Fields live under event_log: in lhp.yaml.
Field |
Type |
Default |
Description |
|---|---|---|---|
|
bool |
|
Set to |
|
string |
— |
Unity Catalog for event-log tables. Required when |
|
string |
— |
Schema for event-log tables. Required when |
|
string |
|
Prefix prepended to each generated event-log table name. |
|
string |
|
Suffix appended to each generated event-log table name. |
Per-pipeline table name is {name_prefix}{pipeline_name}{name_suffix}.
event_log:
catalog: "${catalog}"
schema: _meta
name_suffix: "_event_log"
Monitoring fields¶
The monitoring block. Fields live under monitoring: in lhp.yaml.
Monitoring requires event_log enabled.
Field |
Type |
Default |
Description |
|---|---|---|---|
|
bool |
|
When |
|
string |
|
Name of the generated pipeline, job, and the |
|
string |
inherits |
Override catalog for monitoring tables. |
|
string |
inherits |
Override schema for monitoring tables. |
|
string |
|
Delta table the union notebook appends into (created on first run). |
|
string |
|
Base path for streaming checkpoints; each pipeline gets |
|
string |
— |
Project-root-relative path to the job-config file (below). Required when |
|
integer |
|
|
|
list |
one default view |
Materialized-view definitions. See Materialized views. |
|
bool |
|
Add a |
Catalog and schema resolve as: monitoring.catalog / monitoring.schema
when set, otherwise inherited from event_log. The Delta table’s fully
qualified name is {catalog}.{schema}.{streaming_table}.
monitoring:
checkpoint_path: "/Volumes/${catalog}/_meta/checkpoints/event_logs"
job_config_path: "config/monitoring_job_config.yaml"
Materialized views¶
monitoring.materialized_views has three modes.
Value |
Behavior |
|---|---|
omitted or |
Generate the default |
|
No materialized views and no pipeline file; the job contains only the notebook task. |
explicit list |
Generate only the listed views, replacing the default. |
Each list entry is a mapping with these fields.
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
View name, unique within the list. |
|
string |
One of |
Inline SQL query. Setting both |
|
string |
One of |
Project-root-relative path to a |
The default events_summary view (generated when materialized_views is
omitted) aggregates per-run status, timing, and row-count columns from the
union Delta table; its full column list is documented in the monitoring guide,
not repeated here.
monitoring:
checkpoint_path: "/Volumes/${catalog}/_meta/checkpoints/event_logs"
job_config_path: "config/monitoring_job_config.yaml"
materialized_views:
- name: error_events
sql: "SELECT * FROM all_pipelines_event_log WHERE event_type = 'error'"
- name: custom_analysis
sql_path: "sql/monitoring_custom_analysis.sql"
Job-config file¶
monitoring.job_config_path points to a flat single-document YAML mapping.
LHP deep-merges it over its defaults (max_concurrent_runs: 1,
queue.enabled: true, performance_target: STANDARD) and then
token-substitutes it per environment. The job name is fixed at
<pipeline_name>_job and the pipeline_task is generated automatically.
All fields are optional.
Field |
Description |
|---|---|
|
Maximum concurrent job runs. Default |
|
|
|
|
|
New-cluster spec for the notebook task. Mutually exclusive with |
|
Attach the notebook task to an existing cluster. |
|
Job-level timeout in seconds. |
|
Free-form |
|
|
|
|
|
User/group permission entries ( |
|
Quartz cron schedule: |
Any key not listed above is passed through verbatim into the job resource, so
new Databricks Jobs fields work without an LHP change. A top-level
project_defaults: wrapper, a job_name: key, and pipeline_task
entries are rejected or overridden.
# config/monitoring_job_config.yaml
max_concurrent_runs: 1
performance_target: STANDARD
queue:
enabled: true
tags:
environment: "${bundle.target}"
Validation errors¶
Code |
Trigger |
|---|---|
|
|
|
|
|
|
|
At generate time, the resolved |
|
The monitoring job-config file is not valid YAML. |