# How to trace/log all delete action

**URL:** <https://discuss.elastic.co/t/how-to-trace-log-all-delete-action/272054>\
**Category:** Elasticsearch\
**Created:** [May 4, 2021, 9:24am UTC](https://discuss.elastic.co/t/how-to-trace-log-all-delete-action/272054 "2021-05-04T09:24:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Oullion](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael_oullion/32/46106_2.png) [@Michael\_Oullion](https://discuss.elastic.co/u/Michael_Oullion)\
**Post date:** [May 4, 2021, 9:24am UTC](https://discuss.elastic.co/t/how-to-trace-log-all-delete-action/272054/1 "2021-05-04T09:24:55Z")

</div>

Hi,  
I have a shared ELK in my Enterprise and we need to trace/log 2 type of action :

1. Delete Index by API DELETE Call
2. Delete doc by Delete\_by\_query

I try without success with Audit and slowlog.  
Is there a way to have this information?

Regards,  
Mike.  
PS : ELK 7.5.1 with Basic License

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 4, 2021, 9:44am UTC](https://discuss.elastic.co/t/how-to-trace-log-all-delete-action/272054/2 "2021-05-04T09:44:21Z")

</div>

Audit log is the easiest way to go IMO but you need a Gold+ license ([Subscriptions | Elastic Stack Products & Support | Elastic](https://www.elastic.co/subscriptions)).

Otherwise you can:

- Do that in your application and log when your application is calling those APIs
- Enable slow log but this can lead to a lot of data
- Add a proxy (like ngnix) on top of your elasticsearch instances

May be others have nice ideas?

---

<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:** [June 1, 2021, 9:44am UTC](https://discuss.elastic.co/t/how-to-trace-log-all-delete-action/272054/3 "2021-06-01T09:44:43Z")

</div>

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