How-to debug graphs not being created
Round Robin Database (RRD) error "Cannot get RRD data" and how to troubleshoot.
LAST TESTED ON CHECKMK 2.2.0P1
Table of Contents
Problem
You may be impacted by a Cannot Create Graph error:
To visualize a graph, Checkmk uses RRD. The RRD needs, by nature, two files:
-rw-rw---- 1 mysite mysite 93 Jun 2 07:21 CPU_Utilization_Packet_CPU_2.info -rw-r--r-- 1 mysite mysite 384952 Jun 2 11:22 CPU_Utilization_Packet_CPU_2.rrd
The .rrd file stores all the data, and the .info file defines the service metrics. You will face the message above if one of the files is missing. This message will also be displayed in the cmc.log:
OMD[mysite]:~$ tail -f var/log/cmc.log 2022-06-02 12:09:41 [4] [main] [rrd] [rrdcached at /omd/sites/mysite/tmp/run/rrdcached.sock] >> -1 No such file: /opt/omd/sites/mysite/var/check_mk/rrd/myhost/CPU_Utilization_Packet_CPU_1.rrd 2022-06-02 12:10:41 [4] [main] [rrd] [rrdcached at /omd/sites/mysite/tmp/run/rrdcached.sock] >> -1 No such file: /opt/omd/sites/mysite/var/check_mk/rrd/myhost/CPU_Utilization_Mgmt_CPU.rrd 2022-06-02 12:10:41 [4] [main] [rrd] [rrdcached at /omd/sites/mysite/tmp/run/rrdcached.sock] >> -1 No such file: /opt/omd/sites/mysite/var/check_mk/rrd/myhost/CPU_Utilization_Packet_CPU_0.rrd
Solution
Unfortunately, for some reason, one of the files is missing. In that case, it is the .rrd file. So to make the graphs work again, you need to stop the site, find all the .info files with a missing .rrd file, and delete them manually:Â
OMD[mysite]:~$ for i in $(find ~/var/check_mk/rrd -name *.info); do test -e ${i%info}rrd || echo $i; done /omd/sites/mysite/var/check_mk/rrd/myhost/PING.info /omd/sites/mysite/var/check_mk/rrd/myhost/CPU_Utilization_Mgmt_CPU.info /omd/sites/mysite/var/check_mk/rrd/myhost/CPU_Utilization_Packet_CPU_1.info /omd/sites/mysite/var/check_mk/rrd/myhost/CPU_Utilization_Packet_CPU_0.info
- Now you have a list of files to delete. Please replace
echo $i
withrm $i
in order to delete those files. - After you delete the affected files, you need to start the site to create the new files.
Checkmk does not delete any .rrd file. So it could be deleted by a custom cleaning job!
Related articles