Using folder name in queries

Hi,

Is there any way to access the name of the folder of a dashboard in a query (or somewhere else).

I’m currently working on monitoring in OpenShift. We use the Grafana operator from integreatly in version 3.10.3, which deploys Grafana v7.3.10.

Users can create a GrafanaDashboard in their namespace, the operator scans the whole cluster and imports the found dashboards in grafana. It automatically creates folders with the same name as the kubernetes namespace the dashboard was defined in. So it would be a nice automatic way to query metrics from exactly that namespace.
Metrics are collected by prometheus, so I could image something like

http_requests{namespace="$folder_name"}

This topic was automatically closed after 365 days. New replies are no longer allowed.