Use of template variables

CMK version: 2.2.0p14 raw
OS version: Debian Bulleyes
** CheckMK plugin: tribe-29-checkmk-datasource @ 3.2.2**
** Grafana version: v10.4.2

Error message: Bad Request These fields have problems: host_name

I followed Integrating Checkmk in Grafana to use variables
The menu allowing to multi-select hosts is present.
If a select one single host, graph is working fine.
But I select several hosts, I get the error above in Grafana.

What am I doing wrong ?

you can use this plugin to do it

You are not doing anything wrong. This is a limitation of the plugin.

I’ve already explained this here:

English version: There is a workaround to accomplish that with the enterprise editions of checkmk: instead of using the host filter, you can use the regex filter and enter the following variable: ${variable_name:regex} this will combine multiple host names into one valid regex expression matching all the hostnames selected in the variable menu.
See also: Variable syntax | Grafana documentation

We keep track of the feature request in our GitHub repo: Issues · Checkmk/grafana-checkmk-datasource · GitHub feel free to open an issue there and describe your use-case.

Done : Template variable : multi-selecting host gives : "Error message: Bad Request These fields have problems: host_name" · Issue #248 · Checkmk/grafana-checkmk-datasource · GitHub