...
Status |
---|
colour | Green |
---|
title | LAST TESTED ON CHECKMK 2.23.0P1 |
---|
|
Panel |
---|
borderColor | black |
---|
bgColor | #f8f8f8 |
---|
title | Table of Contents |
---|
|
|
...
You may be impacted by a Cannot Create Graph error:
Image RemovedImage Added
To visualize a graph, Checkmk uses RRD. The RRD needs, by nature, two files:, stored in ~/var/check_mk/rrd/HOSTNAME
Code Block |
---|
|
-rw-rw------ 1 mysite mysite 65 Oct 93 Jun 2 07:219 13:34 CPU_Utilization_Packet_CPU_2utilization.info
-rw-r--r-- 1 mysite mysite 1534768 384952Oct Jun 2 11:2230 09:00 CPU_Utilization_Packet_CPU_2utilization.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:
Code Block |
---|
|
OMD[mysite]:~$ tail ~$ tail -f var/log/cmc.log
20222024-0610-0230 1209:0902:4155 [4] [main]client [rrd0] [rrdcached at /omd/sites/mysite/tmp/run/rrdcached.sock] >> -1 No such file: Error accessing RRD: opening '/opt/omd/sites/mysite/var/check_mk/rrd/myhostlinux/CPU_Utilization_Packet_CPU_1.rrd
2022-06-02 12:10:41utilization.rrd': No such file or directory
2024-10-30 09:02:55 [4] [main]client [rrd0] [rrdcached at /omd/sites/mysite/tmp/run/rrdcached.sock] >> -1 No such file: Error accessing RRD: opening '/opt/omd/sites/mysite/var/check_mk/rrd/myhostlinux/CPU_Utilization_Mgmt_CPUTCP_Connections.rrd
2022-06-02 12:10:41': No such file or directory
2024-10-30 09:02:55 [4] [main]client [rrd0] [rrdcached at /omd/sites/mysite/tmp/run/rrdcached.sock] >> -1 No such file: Error accessing RRD: opening '/opt/omd/sites/mysite/var/check_mk/rrd/myhostlinux/CPUSystemd_Utilization_Packet_CPU_0.rrdTimesyncd_Time.rrd': No such file or directory |
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, to do the following:
Stop the site:
Code Block |
---|
|
OMD[mysite]:~$ omd stop |
Run the below oneliner to find all the .info files with that have a missing .rrd file, and delete them manually: :
Note |
---|
The below oneliner will not delete anything, it only lists the missing files. |
Code Block |
---|
|
OMD[mysite]:~$ for i in $(find ~/var/check_mk/rrd -name "*.info"); do test -e "${i%info}rrd" || echo "$i"; done
|
The output is the following:
Code Block |
---|
|
/omd/sites/mysite/var/check_mk/rrd/myhostlinux/PINGCPU_utilization.info
/omd/sites/mysite/var/check_mk/rrd/myhostlinux/CPU_Utilization_Mgmt_CPUTCP_Connections.info
/omd/sites/mysite/var/check_mk/rrd/myhostlinux/CPUSystemd_Utilization_Packet_CPU_1.info
/omd/sites/mysite/Timesyncd_Time.info |
Next, you can either delete the .info files manually, or automatically, by replacing echo $i with rm $i in the provided oneliner. Like this:
Code Block |
---|
|
OMD[mysite]:~$ for i in $(find ~/var/check_mk/rrd/myhost/CPU_Utilization_Packet_CPU_0.info |
...
-name "*.info"); do test -e "${i%info}rrd" || rm "$i"; done |
After you delete the affected files, you need to start the site
...
and the
...
required files will be recreated:
Code Block |
---|
|
OMD[mysite]:~$ omd start |
Note |
---|
Checkmk does not delete any .rrd file. So it could be deleted by a custom cleaning job! |
...