You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Please add support for the setting: "Custom query parameters" (customQueryParameters) into the datasource.
Describe the solution you'd like
It would be great if the Operator considers the datasource setting customQueryParameters.
Currently, you can set it in the CRD, but it does not end up in the ConfigMap nor in Grafana.
Additional context
I am trying to leverage OpenShift's user-defined monitoring to bring custom metrics into Grafana dashboards. The datasource is configured to talk to "thanos-querier" to find all required data.
In OpenShift there are two services for the thanos-querier.
One is listening on port 9091... everything fine here, I can see data. The problem is, I see too many.
The serviceaccount requires cluster permissions for monitoring (cluster-monitoring-view).
This means you will see ALL metrics. You can create a dashboard, for example, which is displaying all pods from the system.
Therefore, thanos-querier has a service on a second port: 9092.
Here, all you need are project view permissions in order to display metrics from one project only. However, this port requires, that you send the URL parameter "namespace=yournamespace" with the query.
(Thats actually the same, the Developer UI of OpenShift does.)
In Grafana you can configure this, by setting "Custom query parameters" (customQueryParamters) ... the problem is that this parameter will be lost after the grafana Pods restart or a new configuration is done.
Now I have to admit that this setting is not heavily documented inside Grafana documentation, but when you configure it manually on Grafana UI it ends up in the database like this:
sqlite> select * from data_source;
1|1|2|prometheus|Prometheus|proxy|https://thanos-querier.openshift-monitoring.svc.cluster.local:9092||||0|||1|{"customQueryParameters":"namespace=ns1","httpHeaderName1":"Authorization" ...
So, it seems to be part of the struct: jsonData.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Please add support for the setting: "Custom query parameters" (customQueryParameters) into the datasource.
Describe the solution you'd like
It would be great if the Operator considers the datasource setting customQueryParameters.
Currently, you can set it in the CRD, but it does not end up in the ConfigMap nor in Grafana.
Additional context
I am trying to leverage OpenShift's user-defined monitoring to bring custom metrics into Grafana dashboards. The datasource is configured to talk to "thanos-querier" to find all required data.
In OpenShift there are two services for the thanos-querier.
One is listening on port 9091... everything fine here, I can see data. The problem is, I see too many.
The serviceaccount requires cluster permissions for monitoring (cluster-monitoring-view).
This means you will see ALL metrics. You can create a dashboard, for example, which is displaying all pods from the system.
Therefore, thanos-querier has a service on a second port: 9092.
Here, all you need are project view permissions in order to display metrics from one project only. However, this port requires, that you send the URL parameter "namespace=yournamespace" with the query.
(Thats actually the same, the Developer UI of OpenShift does.)
In Grafana you can configure this, by setting "Custom query parameters" (customQueryParamters) ... the problem is that this parameter will be lost after the grafana Pods restart or a new configuration is done.
Now I have to admit that this setting is not heavily documented inside Grafana documentation, but when you configure it manually on Grafana UI it ends up in the database like this:
So, it seems to be part of the struct: jsonData.
The text was updated successfully, but these errors were encountered: