# Enable audit logging (deployment complains about format)

**URL:** <https://discuss.elastic.co/t/enable-audit-logging-deployment-complains-about-format/314478>\
**Category:** Elasticsearch\
**Created:** [September 15, 2022, 7:30am UTC](https://discuss.elastic.co/t/enable-audit-logging-deployment-complains-about-format/314478 "2022-09-15T07:30:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Giorgi\_Jambazishvili](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/giorgi_jambazishvili/32/101881_2.png) [@Giorgi\_Jambazishvili](https://discuss.elastic.co/u/Giorgi_Jambazishvili)\
**Post date:** [September 15, 2022, 7:30am UTC](https://discuss.elastic.co/t/enable-audit-logging-deployment-complains-about-format/314478/1 "2022-09-15T07:30:12Z")

</div>

I try to enable logging on elastic cloud deployment. For this I change the cluster configuration and my yml looks like this:

This configuration complains about the fact that "include" should be type of "text" (" \* Elasticsearch - 'xpack.security.audit.logfile.events.include': has to be text)

```auto
xpack:
  security:
    audit:
      enabled: true
      logfile:
        events:
          include:
            - "anonymous_access_denied"
            - "authentication_failed"

```

I've also tried (same complain about text type):

```auto
xpack:
  security:
    audit:
      enabled: true
      logfile:
        events:
          include: ["anonymous_access_denied", "authentication_failed"]

```

also tried to do so (the deployment failed):

```auto
xpack:
  security:
    audit:
      enabled: true
      logfile:
        events:
          include: "anonymous_access_denied, authentication_failed"

```

Can you please assist what would be the correct syntax for adding several event types in the audit log?

---

<div class="post-metadata">

**Author:** ![linya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/linya/32/87447_2.png) [@linya](https://discuss.elastic.co/u/linya)\
**Post date:** [October 13, 2022, 4:10am UTC](https://discuss.elastic.co/t/enable-audit-logging-deployment-complains-about-format/314478/2 "2022-10-13T04:10:35Z")

</div>

> [@Giorgi\_Jambazishvili](#):
>
> ```auto
> xpack:
> security:
> audit:
> enabled: true
> logfile:
> events:
> include:
> - "anonymous_access_denied"
> - "authentication_failed"
> 
> ```

The following should work, without quotes:

`xpack.security.audit.logfile.events.include: anonymous_access_denied, authentication_failed`

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 10, 2022, 4:10am UTC](https://discuss.elastic.co/t/enable-audit-logging-deployment-complains-about-format/314478/3 "2022-11-10T04:10:54Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
