Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve audit_logs.rst #36213

Merged
merged 1 commit into from
Dec 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 12 additions & 11 deletions docs/apache-airflow/security/audit_logs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,18 @@ Audit logs can be accessed through the Airflow UI. They are located under the "B
Types of Events
---------------

Airflow provides a set of predefined events that can be tracked in audit logs. These events include:

- ``action_trigger_dag``: Triggering a DAG
- ``action_create``: Creating a DAG or task
- ``action_edit``: Modifying a DAG or task
- ``action_delete``: Deleting a DAG or task
- ``action_failed``: Setting a task as failed
- ``action_success``: Setting a task as successful
- ``action_retry``: Retrying a failed task
- ``action_clear``: Clearing a task's state

Airflow provides a set of predefined events that can be tracked in audit logs. These events include, but aren't limited to:

- ``trigger``: Triggering a DAG
- ``[variable,connection].create``: A user created a Connection or Variable
- ``[variable,connection].edit``: A user modified a Connection or Variable
- ``[variable,connection].delete``: A user deleted a Connection or Variable
- ``delete``: A user deleted a DAG or task
- ``failed``: Airflow or a user set a task as failed
- ``success``: Airflow or a user set a task as success
- ``retry``: Airflow or a user retried a task instance
- ``clear``: A user cleared a task's state
- ``cli_task_run``: Airflow triggered a task instance

In addition to these predefined events, Airflow allows you to define custom events that can be tracked in audit logs.
This can be done by calling the ``log`` method of the ``TaskInstance`` object.