Reputation: 199
I'm having trouble following this guide section 3.6.5.3 "Writing Logs to Azure Blob Storage"
The documentation states you need an active hook to Azure Blob storage. I'm not sure how to create this. Some sources say you need to create the hook in the UI, and some say you can use an environment variable. Either way, none of my logs are getting written to blob store and I'm at my wits end.
Upvotes: 1
Views: 2453
Reputation: 757
I achieved writing logs to blob using below steps
config
inside airflow folder__init__.py
and log_config.py
files inside config
folderairflow_local_settings.py
in your machine/home/user/env/lib/python2.7/site-packages/airflow/config_templates/airflow_local_settings.py /home/user/env/lib/python2.7/site-packages/airflow/config_templates/airflow_local_settings.pyc
run
cp /home/user/env/lib/python2.7/site-packages/airflow/config_templates/airflow_local_settings.py config/log_config.py
airflow.cfg
[core] sectionremote_logging = True
remote_log_conn_id = log_sync
remote_base_log_folder=wasb://[email protected]/logs/
logging_config_class =log_config.DEFAULT_LOGGING_CONFIG
install airflow azure dependency
pip install apache-airflow[azure]
Restart webserver and scheduler
Upvotes: 0
Reputation: 2298
Azure Blob Store hook(or any hook for that matter) tells overflow how to write to into Azure Blob Store. This is already included in recent versions of airflow, wasb_hook.
You will need to make sure that the hook is able to write to Azure Blob Store. Just mention the REMOTE_BASE_LOG_FOLDER
bucket should be named like wasb-xxx
. Once you take care of these two things instructions works without a hitch,
Upvotes: 2