Convert RRDs from the old PNP format to the new Checkmk format

Hi,

We have been running raw edition since version 2.2, then we upgraded raw to the latest 2.3 version before upgrading from raw to enterprise edition. The upgrade to enterprise edition went well and then we converted the core to CMC by following this guide:

omd stop
omd config set CORE cmc
omd start
cp var/nagios/nagios.log var/check_mk/core/history
mkdir -p var/check_mk/core/archive && [[ -e var/nagios/archive/ ]] && cp var/nagios/archive/ var/check_mk/core/archive

That also went well but when we tried to convert RRDs from the older PNP format(~/var/pnp4nagios/perfdata) to the new Checkmk format(~/var/check_mk/rrd) we ran into some problems.

Before trying to convert the RRDs we saw some errors in our cmc.log file saying:
Error creating RRD for pnp_multiple… Tried to create ~/var/pnp4nagios/perfdata/servername/servicename.rrd but this RRD exists

First we created a snapshot of the VM running Checkmk enterprise edition.
As the next step we created these two rules as said in the documentation:

Setup → Hosts → Host monitoring rules → Configuration of RRD databases of hosts → Add rule: Configuration of RRD databases of hosts
and
Setup → Services → Service monitoring rules → Configuration of RRD databases of services → Add rule: Configuration of RRD databases of services
both rules with default settings, then we did this as found in the documentation:

omd stop
cmk -v --convert-rrds --delete-rrds
omd start

We got some errors about files not found during the convert command but finally it finished. We have around 440 hosts and 9800 services so there was a lot of information about the progress.

In Checkmk GUI we then got a mix of RRD graphs functioning, not populating and wrongly named(C, D or P for example instead of full name like CPU Load etc.).

I’ve read that this can be because of mixed types of RRDs in ~/var/pnp4nagios/perfdata and/or that some xml files needs to be manually deleted in ~/var/pnp4nagios/perfdata to prevent Checkmk from writing there instead of to ~/var/check_mk/rrd.

Since there seems to be several ways of fixing this I would like to know which is the most recommended and easy way to solve this.

We are currently running Checkmk enterprise edition 2.3.0p14 and everything is working as it should except that we can’t successfully convert our RRDs from the older PNP format to the new one.

We have restored the snapshot created just before converting of the RRDs cause of this problem. Would be grateful to get some advice.

Best Regards
Bjorn.A

We had a similar problem - we discovered that the migration command only seems to convert within a host folder within pnp4nagios until such point that it hit an error, at which point it would then move on to the next host. We had to repeat the command until there were no files left to convert.

As the site user:
Stop the site:
omd stop

Convert the first round of RRDs and check if there are many more RRDs to convert:
cmk -vvv --convert-rrds --delete-rrds 2> /dev/null | grep CMCWARNING | grep -o -e "/opt/omd/sites/.*\.xml" | xargs -I % rm "%"

Repeat the command until there are no more errors returned.

Start the site again:
omd start

You may find that on starting the site again that the amount of disk space used increases as in certain circumstances, CheckMK will not have created the NEW RRD files and the OLD RRD files may have been missing. When it starts up, the new RRD files will be created (and not show any data but be taking up space from pre-allocation).

You may also find that graphs that weren’t working before start to work too.