grafana-checkmk-datasource
grafana-checkmk-datasource copied to clipboard
Variables: Host-filter with multiple values
I am attempting to use a grafana variable in a dashboard to pull out several host that have a similar name.
variable is edfahost and definition is host: {"host_name_regex":{"value":".*EDFA.*","negated":false}}
.
In grafana the variable works in that the preview is pulling the 3 host correctly from my system. The issue comes when I attempt to use it in a graph as a filter -> hostname - $edfahost. To me it looks like the "host": "{822-ERNE-GLEN-EDFA,822-ERNE-VALD-EDFA,835-VALD-ERNE-EDFA}"
portion shown below is the issue. If i use the checkmk swagger interactive api and hone this exact data down to just one host it works just fine but as soon as there is multiple host it fails.
checkmk: 2.2.0p22 grafana-checkmk-datasource: 3.2.1 grafana: 10.4.1
{
"request": {
"method": "POST",
"url": "api/datasources/proxy/uid/GufJd9F4k/rest/check_mk/api/1.0/domain-types/metric/actions/filter/invoke",
"data": {
"filter": {
"host": {
"host": "{822-ERNE-GLEN-EDFA,822-ERNE-VALD-EDFA,835-VALD-ERNE-EDFA}"
},
"service": {
"service": "Booster AMP"
}
},
"aggregation": "off",
"type": "single_metric",
"time_range": {
"start": "2024-04-14T17:21:44.000Z",
"end": "2024-04-15T17:18:44.000Z"
},
"metric_id": "BoosterTemperature"
},
"hideFromInspector": false
},
"response": {
"time_range": {
"start": "2024-04-14T17:21:44+00:00",
"end": "2024-04-15T17:18:44+00:00"
},
"step": 60,
"metrics": []
}
}