# Finding out which hosts are sending logs

**URL:** <https://discuss.elastic.co/t/finding-out-which-hosts-are-sending-logs/185418>\
**Category:** Elasticsearch\
**Created:** [June 12, 2019, 12:39pm UTC](https://discuss.elastic.co/t/finding-out-which-hosts-are-sending-logs/185418 "2019-06-12T12:39:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![poitschkka01](https://avatars.discourse-cdn.com/v4/letter/p/8797f3/32.png) [@poitschkka01](https://discuss.elastic.co/u/poitschkka01)\
**Post date:** [June 12, 2019, 12:39pm UTC](https://discuss.elastic.co/t/finding-out-which-hosts-are-sending-logs/185418/1 "2019-06-12T12:39:47Z")

</div>

Hello,  
I want to find out all hosts (Azure VMs) which are sending log data to GrayLog/Elastic. Is it possible to get the ip address of the host. I used the query below and its giving me the hostname. Unfortunatelly this is overwritten by some admins and does not show me the VM name in Azure.  
Is it possible to extract the IP address of the VM sending logs?

Using:  
Graylog: 2.1.3  
Elasticsearch: 2.4.4

My query:  
curl --silent -XGET 'XX.XXX.XX.XX:9200/\_all/\_search?pretty=true' -H 'Content-Type: application/json' -d '  
{  
"size": "0",  
"aggregations": {  
"uniq\_hosts" : {  
"terms": {"field": "source", "size": 1000}  
}  
}  
}'

---

<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:** [July 10, 2019, 12:39pm UTC](https://discuss.elastic.co/t/finding-out-which-hosts-are-sending-logs/185418/2 "2019-07-10T12:39:52Z")

</div>

Closed on July 10, 2019, 12:39pm UTC

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