---
layout: docs
page_title: "audit enable - Vault CLI"
description: >-
Create and enable a new audit device to capture log data from Vault.
---
# `audit enable`
Enable a new audit device.
```shell-session
$ vault audit enable [flags] [options] [...]
$ vault audit enable [-help | -h]
```
## Description
`audit enable` creates and enables an audit device at the given path or returns
an error if an audit device already exists at the given path. The device
configuration parameters depend on the audit device type.
EnableAuditDevice - [`POST:/sys/audit/{mount-path}`](/vault/api-docs/system/audit#enable-audit-device)
### Limitations and warnings
- None
## Command arguments
@include 'cli/audit/args/device_type.mdx'
Each audit device type also has a set of configuration arguments:
```shell-session
$ vault audit enable [flags] file [options] \
file_path= \
[mode=]
```
@include 'cli/audit/args/file/file_path.mdx'
@include 'cli/audit/args/file/mode.mdx'
```shell-session
$ vault audit enable [flags] socket [options] \
[address=] \
[socket_type=] \
[write_timeout=]
```
@include 'cli/audit/args/socket/address.mdx'
@include 'cli/audit/args/socket/socket_type.mdx'
@include 'cli/audit/args/socket/write_timeout.mdx'
```shell-session
$ vault audit enable [flags] syslog [options] \
[facility=] \
[tag=]
```
@include 'cli/audit/args/syslog/facility.mdx'
@include 'cli/audit/args/syslog/tag.mdx'
## Command options
@include 'cli/audit/options/elide_list_responses.mdx'
@include 'cli/audit/options/exclude.mdx'
@include 'cli/audit/options/fallback.mdx'
@include 'cli/audit/options/filter.mdx'
@include 'cli/audit/options/format.mdx'
@include 'cli/audit/options/hmac_accessor.mdx'
@include 'cli/audit/options/log_raw.mdx'
@include 'cli/audit/options/prefix.mdx'
## Command flags
@include 'cli/audit/flags/description.mdx'
@include 'cli/audit/flags/local.mdx'
@include 'cli/audit/flags/path.mdx'
## Standard flags
@include 'cli/standard-settings/all-standard-flags-but-format.mdx'
## Examples
Enable a `file` type audit device at the default path, `file/`:
```shell-session
$ vault audit enable file file_path=/tmp/my-file.txt
Success! Enabled the file audit device at: file/
```
Enable a `file` type audit device at the path, `audit/file`:
```shell-session
$ vault audit enable -path=audit/file file file_path=/tmp/my-file.txt
Success! Enabled the file audit device at: audit/file/
```