Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Status
colourGreen
titleLAST TESTED ON CHECKMK 2.23.0P1


Panel
borderColorblack
bgColor#f8f8f8
titleTable of Contents

Table of Contents

Problem

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
languagebash
themeRDark
-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
languagebash
themeRDark
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/<HOSTNAME>linux/CPU_Utilization_Packet_CPU_1utilization.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/<HOSTNAME>linux/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/<HOSTNAME>linux/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
languagebash
themeRDark
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
languagebash
themeRDark
OMD[mysite]:~$ for i in $(find ~/var/check_mk/rrd -name "*.info"); do mysitetest -e "${i%info}rrd" || echo "$i"; done

The output is the following:

Code Block
languagebash
themeRDark
/omd/sites/mysite/var/check_mk/rrd/<HOSTNAME>linux/PINGCPU_utilization.info
/omd/sites/mysite/var/check_mk/rrd/<HOSTNAME>linux/CPU_Utilization_Mgmt_CPUTCP_Connections.info
/omd/sites/mysite/var/check_mk/rrd/<HOSTNAME>linux/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
languagebash
themeRDark
OMD[mysite]:~$ for i in $(find ~/var/check_mk/rrd/<HOSTNAME>/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
languagebash
themeRDark
OMD[mysite]:~$ omd start


Note

Checkmk does not delete any .rrd file. So it could be deleted by a custom cleaning job!

Filter by label (Content by label)
showLabelsfalse
max5
spacesKB
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ( "rrd" , "rrdcached" ) and type = "page" and space = "KB"
labelsagent_bakery user_roles_permissions roles user

...