Init script start and finish events are captured in cluster event logs. Details are captured in cluster logs. Global init script create, edit, and delete events are also captured in account-level audit logs.
Cluster event logs capture two init script events:
INIT_SCRIPTS_FINISHED, indicating which scripts are scheduled for execution and which have completed successfully.
INIT_SCRIPTS_FINISHED also captures execution duration.
Global init scripts are indicated in the log event details by the key
"global" and cluster-scoped init scripts are indicated by the key
Cluster event logs do not log init script events for each cluster node; only one node is selected to represent them all.
If cluster log delivery is configured for a cluster, the init script logs are written to
Logs for each container in the cluster are written to a subdirectory called
For example, if
cluster-log-path is set to
cluster-logs, the path to the logs for a specific container would be:
dbfs ls dbfs:/cluster-logs/1001-234039-abcde739/init_scripts
1001-234039-abcde739_10_97_225_166 1001-234039-abcde739_10_97_231_88 1001-234039-abcde739_10_97_244_199
dbfs ls dbfs:/cluster-logs/1001-234039-abcde739/init_scripts/1001-234039-abcde739_10_97_225_166
When cluster log delivery is not configured, logs are written to
/databricks/init_scripts. You can use standard shell commands in a notebook to list and view the logs:
%sh ls /databricks/init_scripts/ cat /databricks/init_scripts/<timestamp>_<log-id>_<init-script-name>.sh.stdout.log
Every time a cluster launches, it writes a log to the init script log folder.
Any user who creates a cluster and enables cluster log delivery can view the
stdout output from global init scripts. You should ensure that your global init scripts do not output any sensitive information.
Databricks audit logs capture global init script create, edit, and delete events under the event type
globalInitScripts. See Global init scripts events.