# Count messages per host

**URL:** <https://discuss.elastic.co/t/count-messages-per-host/53743>\
**Category:** Logstash\
**Created:** [June 23, 2016, 6:59am UTC](https://discuss.elastic.co/t/count-messages-per-host/53743 "2016-06-23T06:59:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcmga](https://avatars.discourse-cdn.com/v4/letter/m/3bc359/32.png) [@marcmga](https://discuss.elastic.co/u/marcmga)\
**Post date:** [June 23, 2016, 6:59am UTC](https://discuss.elastic.co/t/count-messages-per-host/53743/1 "2016-06-23T06:59:09Z")

</div>

Hi there,

I'm not capable of making this work.  
I receive a lot of msg from several servers.  
The kind of messages are the same through servers. What i want to do is count this kind of msg of each host (isolated by host) and if i receive 200 then send me an email.

Well i tried this with throttle but the key i use is the %{host} field. So it counts msg from all servers. What i want is count isolated each server.

i.e.:  
server 1 -\> counter 1  
server 2 -\> counter 2  
......

So when server 1 receives 200 it sends me an email.

Thanks

---

<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 6, 2017, 4:51am UTC](https://discuss.elastic.co/t/count-messages-per-host/53743/2 "2017-07-06T04:51:01Z")

</div>

Closed on July 6, 2017, 4:51am UTC


