Werk #15009: Fix "invalid syntax" error on adding metrics to custom graphs

Component User interface
Title Fix "invalid syntax" error on adding metrics to custom graphs
Date Dec 16, 2022
Checkmk Edition Checkmk Enterprise (CEE)
Checkmk Version 2.1.0p19 2.2.0b1
Level Trivial Change
Class Bug Fix
Compatibility Compatible - no manual interaction needed

If you added metrics via "Add all metrics of this graph to" - "New custom graph..." an error like Cannot load custom_graph from /omd/sites/MYSITE/var/check_mk/web/MYUSER/user_custom_graphs.mk: invalid syntax (<unknown>, line) was shown.

We have seen this especially while adding CPU utilization metrics of windows hosts.

A workaround was to edit the file "/omd/sites/MYSITE/var/check_mk/web/MYUSER/user_custom_graphs.mk" and change entries like "'help': l'CPU time spent in user space'" to "'help': 'CPU time spent in user space'".

To the list of all Werks