0
0
Apache Airflowdevops~20 mins

Audit logging in Apache Airflow - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Audit Logging Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Purpose of Audit Logging in Airflow

What is the main purpose of enabling audit logging in Apache Airflow?

ATo track user actions and changes for security and compliance purposes
BTo improve the speed of DAG execution by caching logs
CTo automatically retry failed tasks without manual intervention
DTo reduce the storage space used by logs by compressing them
Attempts:
2 left
💡 Hint

Think about why organizations need to keep records of who did what and when.

💻 Command Output
intermediate
1:30remaining
Output of Enabling Audit Logging in Airflow Config

What is the expected output or effect after setting audit_logging = True in the Airflow configuration file airflow.cfg and restarting the scheduler?

Apache Airflow
[logging]
audit_logging = True
AAirflow logs user actions like DAG runs and task state changes in the audit log file
BAirflow scheduler fails to start due to invalid config
CAirflow disables all other logs except audit logs
DAirflow automatically archives old logs to cloud storage
Attempts:
2 left
💡 Hint

Enabling audit logging should add extra logging, not remove or break existing features.

Configuration
advanced
2:00remaining
Configuring Audit Logging to Use JSON Format

Which configuration snippet correctly sets up Airflow audit logging to output logs in JSON format for easier parsing?

A
[logging]
audit_logging = True
audit_log_format = plain_text
B
[logging]
audit_logging = True
audit_log_format = json
C
[logging]
audit_logging = False
audit_log_format = json
D
[logging]
audit_logging = True
audit_log_format = xml
Attempts:
2 left
💡 Hint

Audit logging must be enabled and the format set to 'json' exactly.

Troubleshoot
advanced
2:00remaining
Diagnosing Missing Audit Logs

You enabled audit logging in Airflow but notice no audit logs are being generated. Which of the following is the most likely cause?

AThe Airflow webserver is not running
BThe DAGs are not scheduled to run
CThe Airflow user does not have write permissions to the audit log directory
DThe airflow.cfg file is missing the <code>executor</code> setting
Attempts:
2 left
💡 Hint

Think about what could prevent logs from being saved even if logging is enabled.

🔀 Workflow
expert
2:30remaining
Audit Logging Workflow for Compliance

Which sequence correctly describes the workflow for using Airflow audit logs to investigate a suspicious DAG modification?

A3,2,1,4
B2,1,3,4
C1,3,2,4
D1,2,3,4
Attempts:
2 left
💡 Hint

Think about the logical order from setup to investigation to action.