# Collect logs about users logging in to Kibana

**URL:** <https://discuss.elastic.co/t/collect-logs-about-users-logging-in-to-kibana/208040>\
**Category:** Kibana\
**Created:** [November 15, 2019, 10:21am UTC](https://discuss.elastic.co/t/collect-logs-about-users-logging-in-to-kibana/208040 "2019-11-15T10:21:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pheebzer](https://avatars.discourse-cdn.com/v4/letter/p/59ef9b/32.png) [@Pheebzer](https://discuss.elastic.co/u/Pheebzer)\
**Post date:** [November 15, 2019, 10:21am UTC](https://discuss.elastic.co/t/collect-logs-about-users-logging-in-to-kibana/208040/1 "2019-11-15T10:21:11Z")

</div>

Hello.  
I have an ELK stack hosted on elastic cloud. I have multiple different customers who regularly log in to view their respected dashboards.

I would like to collect logs showing successful and unsuccessful login attempts.

I used the API to see which setting i have enabled, and the only one concerning xpack was:  
`xpack.monitoring.collection.enabled: true`

So my question is, what concrete steps should i take to log and collect the events mentioned above?  
Especially what settings should i change, and where?

I know how to use the APIs and that i can modify `elasticsearch.yml` and `Kibana.yml` in the edit section of the cloud management dashboard, i just don't understand what exactly i'm supposed to do.

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![Mikhail\_Shustov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mikhail_shustov/32/49186_2.png) [@Mikhail\_Shustov](https://discuss.elastic.co/u/Mikhail_Shustov)\
**Post date:** [November 15, 2019, 11:04am UTC](https://discuss.elastic.co/t/collect-logs-about-users-logging-in-to-kibana/208040/2 "2019-11-15T11:04:58Z")

</div>

Hi, @Pheebzer.  
It looks like you want to use **Elasticsearch Security Audit**. [https://www.elastic.co/guide/en/elasticsearch/reference/7.4/auditing.html](https://www.elastic.co/guide/en/elasticsearch/reference/7.4/auditing.html)  
It provides the next events (from [https://www.elastic.co/guide/en/elasticsearch/reference/7.4/audit-event-types.html](https://www.elastic.co/guide/en/elasticsearch/reference/7.4/audit-event-types.html)):  
`authentication_success` - Logged when a user successfully authenticates.  
`authentication_failed` - Logged when the authentication token cannot be matched to a known user.|

If you use Kibana Spaces and want to audit access to spaces you should use **Kibana Audit Logging** [https://www.elastic.co/guide/en/kibana/current/xpack-security-audit-logging.html](https://www.elastic.co/guide/en/kibana/current/xpack-security-audit-logging.html)

---

<div class="post-metadata">

**Author:** ![Pheebzer](https://avatars.discourse-cdn.com/v4/letter/p/59ef9b/32.png) [@Pheebzer](https://discuss.elastic.co/u/Pheebzer)\
**Post date:** [November 15, 2019, 11:27am UTC](https://discuss.elastic.co/t/collect-logs-about-users-logging-in-to-kibana/208040/3 "2019-11-15T11:27:04Z")

</div>

Thank you @Mikhail_Shustov, this is exactly what i wanted!

However i now have another problem: Editing and then saving the `elasticsearch.yml` in the cloud dashboard returns `xpack.security.audit.enabled is not allowed`.

This happens for every other setting as well. Normally i would just edit the files manually, but because this is a cloud hosted version i cannot do that. Any ideas why i'm not allowed to change the settings?

---

<div class="post-metadata">

**Author:** ![Mikhail\_Shustov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mikhail_shustov/32/49186_2.png) [@Mikhail\_Shustov](https://discuss.elastic.co/u/Mikhail_Shustov)\
**Post date:** [November 15, 2019, 1:17pm UTC](https://discuss.elastic.co/t/collect-logs-about-users-logging-in-to-kibana/208040/4 "2019-11-15T13:17:24Z")

</div>

Oh, I see. It's a known limitation. [https://www.elastic.co/guide/en/cloud/current/ec-restrictions.html](https://www.elastic.co/guide/en/cloud/current/ec-restrictions.html)  
Could you write to the cloud support and describe the problem? They can help you to enable this functionality.

---

<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:** [December 13, 2019, 1:17pm UTC](https://discuss.elastic.co/t/collect-logs-about-users-logging-in-to-kibana/208040/5 "2019-12-13T13:17:29Z")

</div>

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