# Statistics of requests' ip

**URL:** https://discuss.elastic.co/t/statistics-of-requests-ip/306576
**Category:** Elasticsearch
**Tags:** elastic-stack-monitoring
**Created:** [June 7, 2022, 1:41pm UTC](https://discuss.elastic.co/t/statistics-of-requests-ip/306576 "2022-06-07T13:41:49Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![manropinxu](https://avatars.discourse-cdn.com/v4/letter/m/5fc32e/32.png) [@manropinxu](https://discuss.elastic.co/u/manropinxu)
#### Post date: [June 7, 2022, 1:41pm UTC](https://discuss.elastic.co/t/statistics-of-requests-ip/306576/1 "2022-06-07T13:41:49Z")

</div>

Hi all,

I would like to get metrics about how many requests does Elasticsearch receive grouped by ip of the request sender.

My objective is to find which of my services are querying the most.

I checked the [stats endpoint](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html) but found no hint.

Thanks in advance

---

<div class="post-metadata">

### Author: ![matschaffer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/matschaffer/32/95396_2.png) [@matschaffer](https://discuss.elastic.co/u/matschaffer)
#### Post date: [July 5, 2022, 2:17am UTC](https://discuss.elastic.co/t/statistics-of-requests-ip/306576/2 "2022-07-05T02:17:44Z")

</div>

Hi manropinxu!

You'll want the ES audit log for that: [Enable audit logging | Elasticsearch Guide [8.3] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/enable-audit-logging.html)

Those events will contain an `origin.address`. You won't get exact per-query info but you will get info about connection & authentication.

[Auditing search queries | Elasticsearch Guide [8.3] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/auditing-search-queries.html) has some details on how to get more query details.

The X-Opaque-Id header can also be helpful when trying to find clients causing slow queries or long-running tasks.

[Observability | Elasticsearch JavaScript Client [8.3] | Elastic](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/observability.html#_x_opaque_id_support) has details on that for the javascript client, but any elasticsearch client should support it.

---

<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: [August 2, 2022, 2:18am UTC](https://discuss.elastic.co/t/statistics-of-requests-ip/306576/3 "2022-08-02T02:18:37Z")

</div>

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