Troubleshooting graphs not updating due to RRD files with future timestamps

Troubleshooting graphs not updating due to RRD files with future timestamps

This article explains how to diagnose and fix graphs that are not updating due to RRD files containing future timestamps. 

LAST TESTED ON CHECKMK 2.5.0P1

Table of Contents

For more information on additional RRD issues, please see our KB article Common Round Robin Database (RRD) issues.

 

Problem

Graphs are not updating even though monitoring data is being received successfully.

Typical symptoms include:

  • Service states are updating normally.

  • SNMP walks or agent data remain stable.

  • No obvious errors appear in cmc.log.

  • No obvious errors appear in rrdcached.log.

  • RRD files are present but graph values do not advance.

  • File modification timestamps may appear normal.

This issue can occur when existing RRD files are imported and one or more of those files contain a last update timestamp that lies in the future.

 

Root Cause

RRD files only accept updates with timestamps newer than their current last update value.

If an RRD file contains a timestamp in the future, all incoming updates with current timestamps are rejected. As a result, graphs stop updating even though monitoring data continues to arrive.

This can occur after:

  • Importing existing RRD files

  • RRD migrations

  • Restoring RRD files from backups

  • Any situation that results in an RRD file containing a future timestamp


Solution

Locate the affected RRD file

As the site user, navigate to the RRD directory:

OMD[mysite]:~$ cd ~/var/check_mk/rrd

Locate the RRD file belonging to the affected service.

 

 

Check the RRD last update timestamp

Run:

OMD[mysite]:~$ rrdtool lastupdate <filename>.rrd

 

Example output:

1 1780161153: -1.319
  • First line is the number of datasources

  • Second line contains the last update timestamp stored inside the RRD.

 

Check the current system timestamp

Run:

OMD[mysite]:~$ date +%s

 

Example:

1778623044

Compare the values.

If the RRD timestamp is greater than the current system timestamp, the RRD file contains a future timestamp and will reject incoming updates.

 

Convert timestamps to a readable date

Convert both values for easier comparison:

OMD[mysite]:~$ date -d "@1780161153" '+%Y-%m-%d %H:%M:%S UTC' OMD[mysite]:~$ date -d "@1778623044" '+%Y-%m-%d %H:%M:%S UTC'

 

Example:

2026-05-30 17:12:33 UTC 2025-05-12 14:44:04 UTC

This confirms that the RRD file is ahead of the current system time.

 

Correct the future timestamp

Create a corrected XML representation of the RRD file by replacing the future lastupdate value with a valid timestamp.

OMD[mysite]:~$ rrdtool dump <filename>.rrd | \ sed 's/<lastupdate>1780161153<\/lastupdate>/<lastupdate>1778623044<\/lastupdate>/' \ > fixed.xml

 

Restore the corrected RRD file:

OMD[mysite]:~$ rm <filename>.rrd OMD[mysite]:~$ rrdtool restore fixed.xml <filename>.rrd

 

rrdtool restore will fail if the target RRD file already exists. Remove or rename the original file before restoring the corrected version.

 

Verify the repair

Confirm that the corrected timestamp is no longer in the future:

OMD[mysite]:~$ rrdtool lastupdate <filename>.rrd

The returned timestamp should now be less than or equal to the current system time. Graph updates should resume once new monitoring data is written to the RRD.

 

Related articles