# How to cache metric data?

**URL:** https://discuss.elastic.co/t/how-to-cache-metric-data/202895
**Category:** Beats
**Tags:** metricbeat
**Created:** [October 9, 2019, 6:23pm UTC](https://discuss.elastic.co/t/how-to-cache-metric-data/202895 "2019-10-09T18:23:52Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![pixelrebel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pixelrebel/32/14056_2.png) [@pixelrebel](https://discuss.elastic.co/u/pixelrebel)
#### Post date: [October 9, 2019, 6:23pm UTC](https://discuss.elastic.co/t/how-to-cache-metric-data/202895/1 "2019-10-09T18:23:52Z")

</div>

I ran a test and disconnected the network from a system with metricbeat running. When network came back, metricbeat never sent the data that was collected during the outage. There is a gap in my data. How do I enable local caching?

---

<div class="post-metadata">

### Author: ![Alex\_Kristiansen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_kristiansen/32/46086_2.png) [@Alex\_Kristiansen](https://discuss.elastic.co/u/Alex_Kristiansen)
#### Post date: [October 14, 2019, 2:04pm UTC](https://discuss.elastic.co/t/how-to-cache-metric-data/202895/2 "2019-10-14T14:04:23Z")

</div>

@pixelrebel,

Metricbeat is set by default to drop events after 3 retries, this number can be changed: [https://www.elastic.co/guide/en/beats/metricbeat/current/elasticsearch-output.html](https://www.elastic.co/guide/en/beats/metricbeat/current/elasticsearch-output.html)

In addition, metricbeat has an internal memory queue and a file spool (currently in beta) that you can configure: [https://www.elastic.co/guide/en/beats/metricbeat/current/configuring-internal-queue.html](https://www.elastic.co/guide/en/beats/metricbeat/current/configuring-internal-queue.html)

---

<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: [November 11, 2019, 2:04pm UTC](https://discuss.elastic.co/t/how-to-cache-metric-data/202895/3 "2019-11-11T14:04:24Z")

</div>

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