Skip to end of metadata
Go to start of metadata

Problem

If you did the upgrade to Checkmk 2.0 and are using the old Service descriptions, you need to migrate this manually:


Solution


Before you start, please make a backup of the RRD files!

  1. We need to find all the rrd files with fs_*

    OMD[<sitename>]:~$ for i in $(find . -type f -name "fs_*"); do  echo $i; done
    ./var/check_mk/rrd/Windows/fs_C__.rrd
    ./var/check_mk/rrd/Windows/fs_C__.info
    ./var/check_mk/rrd/localhost3/fs__boot_efi.info
    ./var/check_mk/rrd/localhost3/fs__media_anastasios_SDCard.rrd
    ./var/check_mk/rrd/localhost3/fs__boot.info
    ./var/check_mk/rrd/localhost3/fs__media_anastasios_USB.rrd
    ./var/check_mk/rrd/localhost3/fs__opt_omd_sites_workshop_tmp.rrd
    ./var/check_mk/rrd/localhost3/fs__.rrd
    ./var/check_mk/rrd/localhost3/fs__media_anastasios_USB.info
    ./var/check_mk/rrd/localhost3/fs__boot.rrd
    ./var/check_mk/rrd/localhost3/fs__media_anastasios_SDCard.info
    ./var/check_mk/rrd/localhost3/fs__opt_omd_sites_workshop_tmp.info
    ./var/check_mk/rrd/localhost3/fs__.info
    ./var/check_mk/rrd/localhost3/fs__boot_efi.rrd
    ./var/check_mk/rrd/localhost/fs__boot_efi.info
    ./var/check_mk/rrd/localhost/fs__media_anastasios_SDCard.rrd
    ./var/check_mk/rrd/localhost/fs__boot.info
    ./var/check_mk/rrd/localhost/fs__media_anastasios_USB.rrd
    ./var/check_mk/rrd/localhost/fs__opt_omd_sites_workshop_tmp.rrd
    ./var/check_mk/rrd/localhost/fs__.rrd
    ./var/check_mk/rrd/localhost/fs__media_anastasios_USB.info
    ./var/check_mk/rrd/localhost/fs__boot.rrd
    ./var/check_mk/rrd/localhost/fs__media_anastasios_SDCard.info
    ./var/check_mk/rrd/localhost/fs__opt_omd_sites_workshop_tmp.info
    ./var/check_mk/rrd/localhost/fs__.info
    ./var/check_mk/rrd/localhost/fs__boot_efi.rrd
  2. This is the most dangerous step. We need to rename all these files from fs_* to Filesystem_:

    OMD[<sitename>]:~$ for i in $(find . -type f -name "fs_*"); do sed -i "s/SERVICE fs_\(.*\)/SERVICE Filesystem \\1/" $i; mv "$i" "$(echo "$i" |sed s/fs_/Filesystem_/)"; done
  3. Let's check if we did a good job:

    OMD[<sitename>]:~$ for i in $(find . -type f -name "fs_*"); do  echo $i; done
    
    No results for fs_*
    
    OMD[workshop]:~$ for i in $(find . -type f -name "Filesystem_*"); do  echo $i; done
    ./var/check_mk/rrd/Windows/Filesystem_C__.info
    ./var/check_mk/rrd/Windows/Filesystem_C__.rrd
    ./var/check_mk/rrd/localhost3/Filesystem__boot.rrd
    ./var/check_mk/rrd/localhost3/Filesystem__.info
    ./var/check_mk/rrd/localhost3/Filesystem__media_anastasios_SDCard.rrd
    ./var/check_mk/rrd/localhost3/Filesystem__boot_efi.info
    ./var/check_mk/rrd/localhost3/Filesystem__boot_efi.rrd
    ./var/check_mk/rrd/localhost3/Filesystem__opt_omd_sites_workshop_tmp.info
    ./var/check_mk/rrd/localhost3/Filesystem__opt_omd_sites_workshop_tmp.rrd
    ./var/check_mk/rrd/localhost3/Filesystem__media_anastasios_USB.rrd
    ./var/check_mk/rrd/localhost3/Filesystem__.rrd
    ./var/check_mk/rrd/localhost3/Filesystem__media_anastasios_USB.info
    ./var/check_mk/rrd/localhost3/Filesystem__boot.info
    ./var/check_mk/rrd/localhost3/Filesystem__media_anastasios_SDCard.info
    ./var/check_mk/rrd/localhost/Filesystem__boot.rrd
    ./var/check_mk/rrd/localhost/Filesystem__.info
    ./var/check_mk/rrd/localhost/Filesystem__media_anastasios_SDCard.rrd
    ./var/check_mk/rrd/localhost/Filesystem__boot_efi.info
    ./var/check_mk/rrd/localhost/Filesystem__boot_efi.rrd
    ./var/check_mk/rrd/localhost/Filesystem__opt_omd_sites_workshop_tmp.info
    ./var/check_mk/rrd/localhost/Filesystem__opt_omd_sites_workshop_tmp.rrd
    ./var/check_mk/rrd/localhost/Filesystem__media_anastasios_USB.rrd
    ./var/check_mk/rrd/localhost/Filesystem__.rrd
    ./var/check_mk/rrd/localhost/Filesystem__media_anastasios_USB.info
    ./var/check_mk/rrd/localhost/Filesystem__boot.info
    ./var/check_mk/rrd/localhost/Filesystem__media_anastasios_SDCard.info
    OMD[workshop]:~$ 
  4. Now we need to change the service description in the global settings:
    Setup → General → Global Settings → Use new service descriptions → Used space in filesystems

  5. Please follow the instructions here
  6. Now you should see the new Services in Checkmk with your old historic data: