-
What Grafana version and what operating system are you using?
Grafana v11.6.0 (d2fdff9ee4), k3s, ubuntu -
What are you trying to achieve?
Being able to set a query for “Show context”. It now shows all logs in all namespaces for all applications.
So I have dashboards that filters per kubernetes namespace.
So one dashboard for namepace1 and one for namespace2 etc.
But when looking at the logs and pressing “Show context” I see alot of stuff that does not have anything to do with current namespace.
I would love to be able to use variables and somehow configure the query “show context” uses.
When looking at the payload sent to the api when clicking “show context” there is a query-property. But it is just empty string.
If I modify that query-property in chrome devtools to include a query everything looks like it is working perfectly. How can I set this query in a dashboard-json-config?
The code that sets query: ‘’ is in datasource.ts line 1214:
const query: ElasticsearchQuery = {
refId: log-context-${row.dataFrame.refId}-${direction}
,
metrics: [logQuery],
query: ‘’,
};