Versions OpenSearch Dashboard 3.6.0
Describe the issue:
I am using a Vega visualization in my dashboard, but the global dashboard filters are not being applied to the visualization.
i applied filter attributes.resource.attributes.host@name
Configuration
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"%context%": true,
"%timefield%": "time",
"autosize": { "type": "fit", "contains": "padding" },
"signals": [
{
"name": "cardWidth",
"value": 220
},
{
"name": "cardHeight",
"value": 120
},
{
"name": "cols",
"update": "max(1, floor(width / cardWidth))"
}
],
"data": [
{
"name": "raw",
"url": {
"index": "ss4o_metrics-otel-*",
"body": {
"size": 200,
"sort": [{ "time": "desc" }],
"query": {
"bool": {
"filter": [
{
"term": {
"name": "freeswitch_sofia_gateway_status"
}
},
{
"range": {
"time": {
"gte": "now-30m",
"lte": "now"
}
}
}
]
}
}
}
},
"format": { "property": "hits.hits" }
},
{
"name": "table",
"source": "raw",
"transform": [
{
"type": "formula",
"as": "server",
"expr": "datum._source.attributes['resource.attributes.host@name']"
},
{
"type": "formula",
"as": "proxy",
"expr": "datum._source.attributes['metric.attributes.proxy']"
},
{
"type": "formula",
"as": "value",
"expr": "datum._source.value"
},
{
"type": "filter",
"expr": "datum.server != null && datum.proxy != null"
},
{
"type": "aggregate",
"groupby": ["server", "proxy"],
"ops": ["max"],
"fields": ["value"],
"as": ["value"]
},
{
"type": "formula",
"as": "status",
"expr": "datum.value == 1 ? 'Active' : 'Down'"
},
{
"type": "window",
"ops": ["row_number"],
"as": ["row"]
},
{
"type": "formula",
"as": "col",
"expr": "(datum.row - 1) % cols"
},
{
"type": "formula",
"as": "rowIndex",
"expr": "floor((datum.row - 1) / cols)"
},
{
"type": "formula",
"as": "x",
"expr": "datum.col * cardWidth"
},
{
"type": "formula",
"as": "y",
"expr": "datum.rowIndex * cardHeight"
}
]
}
],
"marks": [
{
"type": "rect",
"from": { "data": "table" },
"encode": {
"enter": {
"width": { "signal": "cardWidth - 20" },
"height": { "signal": "cardHeight - 20" },
"cornerRadius": { "value": 10 }
},
"update": {
"x": { "field": "x" },
"y": { "field": "y" },
"fill": [
{ "test": "datum.status === 'Active'", "value": "#2B7B68" },
{ "test": "datum.status === 'Down'", "value": "#ff1744" }
],
"tooltip": {
"signal": "{'Server': datum.server, 'Proxy': datum.proxy, 'Status': datum.status}"
}
}
}
},
{
"type": "text",
"from": { "data": "table" },
"encode": {
"enter": {
"fontSize": { "value": 12 },
"fontWeight": { "value": "bold" },
"fill": { "value": "white" }
},
"update": {
"x": { "signal": "datum.x + 10" },
"y": { "signal": "datum.y + 25" },
"text": { "field": "server" }
}
}
},
{
"type": "text",
"from": { "data": "table" },
"encode": {
"enter": {
"fontSize": { "value": 11 },
"fill": { "value": "white" }
},
"update": {
"x": { "signal": "datum.x + 10" },
"y": { "signal": "datum.y + 50" },
"text": { "field": "proxy" }
}
}
},
{
"type": "text",
"from": { "data": "table" },
"encode": {
"enter": {
"fontSize": { "value": 14 },
"fontWeight": { "value": "bold" },
"fill": { "value": "white" }
},
"update": {
"x": { "signal": "datum.x + 10" },
"y": { "signal": "datum.y + 75" },
"text": { "field": "status" }
}
}
}
]
}
Relevant Logs or Screenshots
My Index Sample Data is
{
"_index": "ss4o_metrics-otel-2026.04.30",
"_id": "82Lo3J0BJ6hvOT3gVc9P",
"_score": null,
"_source": {
"unit": "",
"exemplars": [],
"kind": "GAUGE",
"name": "freeswitch_sofia_gateway_status",
"flags": 0,
"description": "freeswitch gateways status",
"startTime": "1970-01-01T00:00:00Z",
"attributes": {
"resource.attributes.url@scheme": "http",
"resource.attributes.host@name": "Voicebot-MS2-127.0.0.1",
"resource.attributes.service@instance@id": "127.0.0.1:9282",
"resource.attributes.service@name": "freeswitch_exporter",
"metric.attributes.proxy": "sip:127.0.0.1",
"metric.attributes.profile": "internal",
"instrumentationScope.version": "0.149.0",
"instrumentationScope.name": "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver",
"resource.attributes.server@port": "9282",
"resource.attributes.os@type": "linux",
"metric.attributes.scheme": "Digest",
"metric.attributes.name": "33991f16-bb9e-11f0-b912-92de005ffd39",
"metric.attributes.context": "public"
},
"time": "2026-04-30T05:41:42.302Z",
"serviceName": "freeswitch_exporter",
"value": 1,
"schemaUrl": "https://opentelemetry.io/schemas/1.39.0"
},
"sort": [
1777527702302
]
}