# How to aggregate heartbeat style log

**URL:** <https://discuss.elastic.co/t/how-to-aggregate-heartbeat-style-log/156139>\
**Category:** Logstash\
**Created:** [November 10, 2018, 1:14pm UTC](https://discuss.elastic.co/t/how-to-aggregate-heartbeat-style-log/156139 "2018-11-10T13:14:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dypsok\_K](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@Dypsok\_K](https://discuss.elastic.co/u/Dypsok_K)\
**Post date:** [November 10, 2018, 1:14pm UTC](https://discuss.elastic.co/t/how-to-aggregate-heartbeat-style-log/156139/1 "2018-11-10T13:14:23Z")

</div>

Hi, I have some big files of log filled each 15 seconds with a heartbeat test result.  
For example one of this file is like this :

```
2018-07-17 10:14:41.646166 TRACE Service:Sales.API Result:OK
2018-07-17 10:14:56.646166 TRACE Service:Sales.API Result:OK
2018-07-17 10:15:10.646166 TRACE Service:Sales.API Result:K0
2018-07-17 10:15:24.646166 TRACE Service:Sales.API Result:OK
2018-07-17 10:18:24.646166 TRACE Service:Sales.API Result:OK

```

For monitoring purpose I am only interested about KO result and detect if the heartbeat ping is not running :

- I want to know if there is a known pattern to aggregate this input and produce at output a summary as follow :

---

<div class="post-metadata">

**Author:** ![Dypsok\_K](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@Dypsok\_K](https://discuss.elastic.co/u/Dypsok_K)\
**Post date:** [November 15, 2018, 12:29pm UTC](https://discuss.elastic.co/t/how-to-aggregate-heartbeat-style-log/156139/2 "2018-11-15T12:29:39Z")

</div>

no one could help ?

---

<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, 2018, 12:29pm UTC](https://discuss.elastic.co/t/how-to-aggregate-heartbeat-style-log/156139/3 "2018-12-13T12:29:48Z")

</div>

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