How-to adjust RRD storage time range

In this guide, we will show you how to modify the Round Robin Database (RRD) storage time range format.

LAST TESTED ON CHECKMK 2.1.0P1

Table of Contents

Step-by-step guide

Some basics about the RRD storage format

Example

The formula for saving measurements, 6 years with an aggregated step of 6 hours or one day:
 
8760 Measurements points=366[Day/Year] x 6[Years] x 4[6-hours measurements points/day]
52560 Measurements points=366[Day/Year] x 6[Years] x 24[1-hours measurements points/day]


"Number of steps aggregated into one data point=360" for 6-hour measurement points. Because 6 hours x 60 min = 360 min (360 steps)

"Number of steps aggregated into one data point=60" for 1-hour measurement points. Because one hour is 60min (60steps).


You can use different aggregated steps depending on your needs!


Another example:

The formula for saving measurements 1 or 8 years with an aggregated step of one minute:

One year: 366 x 1 x 24 x 60 = 525.600 measurement points
Eight years: 366 x 8 x 24 x 60 = 4.204.800 measurement points


Please keep in mind that you will need more space if you save metrics with higher aggregated steps. A short example:

If I would like to save measurements every minute on an 8 years time range, I need 4.204.800 (see the above calculation) measurement points.


Every measurement point will need 8 bytes = 4.216.320 x 8 = 34 MBs. Now we need to multiply this with 3 because of the consolidation function min, max, and avg.

So in this example, we would need about 99mb per metric! In this case, if you save measurements every minute, you can disable the consolidation function and save about 66 MB!

Customize the RRD structure

  1. Create the rule "Configuration of RRD databases of hosts" 

    Setup → Services → Service monitoring rules → Configuration of RRD databases of services
    Screenshot of configuration of RRD databases of services rule. Description reads Default RRD configuration. Using new single RRD format.

    Screenshot of options. Percentage of points below which an interval is unknown is set to 50 percent.

  2. Create the rule "Configuration of RRD databases of hosts"
    Screenshot of options. Percentage of points below which an interval is unknown is set to 50 percent.

    .

  3. Save and activate the changes

  4. Convert the RRD Files

    OMD[mysite]:~$ omd stop
    OMD[mysite]:~$ cmk --convert-rrds -vv

    In this example, I used 480 (8 hours) as aggregated steps!