# Netdata dbengine not keeping enough data

**URL:** <https://community.netdata.cloud/t/netdata-dbengine-not-keeping-enough-data/1214>\
**Category:** Help\
**Tags:** agent-dbengine, agent\
**Created:** [April 22, 2021, 2:13pm UTC](https://community.netdata.cloud/t/netdata-dbengine-not-keeping-enough-data/1214 "2021-04-22T14:13:28Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert\_Morrow](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/robert_morrow/32/733_2.png) [@Robert\_Morrow](https://community.netdata.cloud/u/Robert_Morrow)\
**Post date:** [April 22, 2021, 2:13pm UTC](https://community.netdata.cloud/t/netdata-dbengine-not-keeping-enough-data/1214/1 "2021-04-22T14:13:29Z")

</div>

## Problem/Question

I am sure I have something configured incorrectly, but not sure. I am not getting as much data retained as I would like. I have

## Environment

host is running 1.29.3, and I have 10 others streaming to this host all running older versions.  
[global]  
memory mode = dbengine  
dbengine mutihost disk space = 108765  
page cache size = 64  
# history = 604800  
[API]  
commented out default memory and history

## What I expected to happen

I expected it to keep data till the disk space filled to 100G, but I only get 2.5 hours in the web interface of data.. I would like to be able to view more in the interface. Can someone point to where I am configuring it incorrectly.

---

<div class="post-metadata">

**Author:** ![andrewm4894](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/andrewm4894/32/125_2.png) [@andrewm4894](https://community.netdata.cloud/u/andrewm4894)\
**Post date:** [April 22, 2021, 2:35pm UTC](https://community.netdata.cloud/t/netdata-dbengine-not-keeping-enough-data/1214/2 "2021-04-22T14:35:58Z")

</div>

hmm - i think it might also depend on what is in `/etc/netdata/stream.conf` on the parent node. Can you share that too?

here is how i have it set up for a development parent node i am using.

`netdata.conf` on parent:

```auto
[global]
        ...
        dbengine multihost disk space = 1024
        ...

```

where `...` means i just left everything else alone.

`stream.conf` on parent:

```auto
[111-222-333-444-555]
    enabled = yes
    # default history = 604800
    default memory mode = dbengine
    health enabled by default = yes
    allow from = *
    multiple connections = allow

```

`stream.conf` on child:

```auto
[stream]
    enabled = yes
    destination = my.ip.address:19999
    api key = 111-222-333-444-555

```

So i’m not sure if anything obvious jumps out from that.

Alternatively maybe it could be something to do with children being older versions maybe but that should like could almost be a bug then that we would need to look into.

---

<div class="post-metadata">

**Author:** ![Robert\_Morrow](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/robert_morrow/32/733_2.png) [@Robert\_Morrow](https://community.netdata.cloud/u/Robert_Morrow)\
**Post date:** [April 22, 2021, 4:27pm UTC](https://community.netdata.cloud/t/netdata-dbengine-not-keeping-enough-data/1214/3 "2021-04-22T16:27:59Z")

</div>

netdata.conf on parent:

> [global]  
> run as user = netdata  
> memory mode = dbengine  
> dbengine mutihost disk space = 108765  
> page cache size = 64
> 
> ```
> # the default database size - 1 hour
> # history = 604800
> 
> # some defaults to run netdata with least priority
> process scheduling policy = idle
> OOM score = 1000
> 
> stock config directory = /etc/netdata/conf.d
> 
> ```
> 
> [web]  
> web files owner = root  
> web files group = netdata
> 
> ```
> # by default do not expose the netdata port
> bind to = 0.0.0.0
> 
> ```
> 
> [health]  
> stock health configuration directory = /etc/netdata/conf.d/health.d

conf.d/stream.conf :

> [api]  
> enabled = yes  
> allow from = \*  
> default memory mode = dbengine  
> health enabled by default = yes  
> default postpone alarms on connect seconds = 60

stream on child :

> [stream]  
> enabled = yes  
> destination = \*\*\*\*\*\*\*\*\*  
> api key = [api]  
> timeout seconds = 60  
> default port = 19999  
> buffer size bytes = 1048576  
> reconnect delay seconds = 5  
> initial clock resync iterations = 60

With these setting I get about 2.5 hours of data and it rolls off…

---

<div class="post-metadata">

**Author:** ![Christopher\_Akritid1](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/christopher_akritid1/32/419_2.png) [@Christopher\_Akritid1](https://community.netdata.cloud/u/Christopher_Akritid1)\
**Post date:** [April 23, 2021, 12:18pm UTC](https://community.netdata.cloud/t/netdata-dbengine-not-keeping-enough-data/1214/4 "2021-04-23T12:18:11Z")

</div>

Working properly and only maintaining a couple of hours of data with so much disk space given is strange. I’d expect you to run out of memory before the metrics get rolled off.

I doubt it’s this, but if you look at the bottom right of the UI, how many metrics do you have in total from all 11 nodes (parent + children)?  
 ![image](https://canada1.discourse-cdn.com/flex029/uploads/netdata2/original/1X/5fbed6af96f662ad5fc74ca3ebfce8bae4f62fe5.png)

I don’t expect you have something so exceptionally large to cause this, but let’s see. A “normal” number is ~2k-3k metrics per node.

[This calculator](https://learn.netdata.cloud/docs/store/change-metrics-storage#calculate-the-system-resources-ram-disk-space-needed-to-store-metrics) is not perfect, but it gives a general idea of the storage and memory required for specific metrics.

---

<div class="post-metadata">

**Author:** ![Robert\_Morrow](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/robert_morrow/32/733_2.png) [@Robert\_Morrow](https://community.netdata.cloud/u/Robert_Morrow)\
**Post date:** [April 23, 2021, 1:35pm UTC](https://community.netdata.cloud/t/netdata-dbengine-not-keeping-enough-data/1214/5 "2021-04-23T13:35:43Z")

</div>

unfortunately mine does not five me a nice summation of the total metrics, but adding them up it was a total of 29200 metrics (and it was 2 - 3K a node… I think one was just over 4). Memory usage is sitting at 800M and disk is only using 384M.

---

<div class="post-metadata">

**Author:** ![OdysLam](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/odyslam/32/98_2.png) [@OdysLam](https://community.netdata.cloud/u/OdysLam)\
**Post date:** [April 24, 2021, 5:44am UTC](https://community.netdata.cloud/t/netdata-dbengine-not-keeping-enough-data/1214/6 "2021-04-24T05:44:34Z")

</div>

It _should_ have the summation. Can you please share with us the version of the Netdata Agent that you are using? We should fix this if it’s a bug.

Thanks for your patience in counting them manually 🙂

---

<div class="post-metadata">

**Author:** ![Stelios\_Fragkakis](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/stelios_fragkakis/32/136_2.png) [@Stelios\_Fragkakis](https://community.netdata.cloud/u/Stelios_Fragkakis)\
**Post date:** [April 26, 2021, 7:58am UTC](https://community.netdata.cloud/t/netdata-dbengine-not-keeping-enough-data/1214/7 "2021-04-26T07:58:19Z")

</div>

Hi @Robert_Morrow

Please edit your netdata.conf file and fix the following

dbengine mutihost disk space = 108765

Notice, that it says “mutihost” instead of multihost

---

<div class="post-metadata">

**Author:** ![Robert\_Morrow](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/robert_morrow/32/733_2.png) [@Robert\_Morrow](https://community.netdata.cloud/u/Robert_Morrow)\
**Post date:** [April 26, 2021, 9:02pm UTC](https://community.netdata.cloud/t/netdata-dbengine-not-keeping-enough-data/1214/8 "2021-04-26T21:02:09Z")

</div>

I feel stupid now with that typo. Thank you @Stelios_Fragkakis for your attention to detail in catching my _ **simple** _ mistake. Everything is working as planned now. 😄

---

<div class="post-metadata">

**Author:** ![andrewm4894](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/andrewm4894/32/125_2.png) [@andrewm4894](https://community.netdata.cloud/u/andrewm4894)\
**Post date:** [April 27, 2021, 8:53am UTC](https://community.netdata.cloud/t/netdata-dbengine-not-keeping-enough-data/1214/9 "2021-04-27T08:53:35Z")

</div>

@Robert_Morrow lol - was about 3 or 4 of us who also missed it 🙂

@Stelios_Fragkakis gets the attention to detail award!

---

<div class="post-metadata">

**Author:** ![OdysLam](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/odyslam/32/98_2.png) [@OdysLam](https://community.netdata.cloud/u/OdysLam)\
**Post date:** [April 27, 2021, 12:20pm UTC](https://community.netdata.cloud/t/netdata-dbengine-not-keeping-enough-data/1214/10 "2021-04-27T12:20:24Z")

</div>

@Robert_Morrow, can you please tell us the version of the netdata agent that you use and send us a screenshot of the dashboard? I want to root-cause the reason behind you not having the summary of all the metrics that you are gathering.

> @Stelios_Fragkakis 🕶, except that he always pays attention to detail.

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/netdata2/original/1X/bc81b94cc7162b27c127d64f254ab54cf85a7544.jpeg)
