Debug invalid configuration variable df_use_fs_used_as_metric_name error

This article helps troubleshoot an invalid configuration error of "df_use_fs_used_as_metric_name".

LAST TESTED ON CHECKMK 2.0.0P1

Table of Contents

Problem

During the upgrade process to Checkmk 2.0, we run a script to rename the metric names in Filesystem checks from mount to fs_used. If the user already performed the migration on the 1.6 version, the update script only does a cleanup. After this migration, the file inside the site content stored in ~/etc/check_mk/conf.d/fs_cap.mk(from updates on 1.6) should be removed automatically.

In some cases, the cleanup is not successful. In this case, you would receive the following message:

OMD[mysite]:~$ cmk -U
Invalid configuration variable 'df_use_fs_used_as_metric_name'
--> Found 1 invalid variables
If you use own helper variables, please prefix them with .+


Solution

The solution is to delete the file ~/etc/check_mk/conf.d/fs_cap.mk. Before doing that, make sure that you're using the metric fs_used in Filesystem checks; that is, the update of the metric names has been completed successfully.

We provide two commands for comparing the overall result of the Filesystem Checks with the metrics in there. 

OMD[mysite]:~/var/check_mk/rrd$ find . -type f -name "Filesystem_*.info"  -exec grep "fs_used" {} \; | wc -l
OMD[mysite]:~/var/check_mk/rrd$ find . -type f -name "Filesystem_*.info" | wc -l

If both results are the same, you can delete ~/etc/check_mk/conf.d/fs_cap.mk

Background information