Thank you for this solution and different approach. Meanwhile I expanded the code of the starlark processor with different (if/else) conditions and additional logging to indentify wrongly named devices to drop their metric in order to not “destroy” the database scheme and report the issue to me. Unfortunately this can’t be solved with xpath .