Closed liyongc closed 3 years ago
Issues go stale after 90d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/lifecycle rotten /remove-lifecycle stale
Rotten issues close after 30d of inactivity.
Reopen the issue by commenting /reopen
.
Mark the issue as fresh by commenting /remove-lifecycle rotten
.
Exclude this issue from closing again by commenting /lifecycle frozen
.
/close
@openshift-bot: Closing this issue.
I have standalone prometheus installed in the different namespces (e.g dev1) from the default namespace "openshift-monitoring" for my app. And I want to add my standalone prometheus to default grafana.
Now I can use the sa (service account) "prom" (service account of the standalone prometheus ) to do the prometheus api query with authtication bear
With the same sa "prom" I can also run some grafana datasource api query.
Also I add the standalone prometheus to grafana with POST /api/datasources { "name": "${datasource_name}", "type": "prometheus", "typeLogoUrl": "", "access": "proxy", "url": "https://$( oc get route prom -n "${prometheus_namespace}" -o jsonpath='{.spec.host}' )", "basicAuth": false, "withCredentials": false, "jsonData": { "tlsSkipVerify":true, "httpHeaderName1":"Authorization" }, "secureJsonData": { "httpHeaderValue1":"Bearer $( oc sa get-token prom -n "${prometheus_namespace}" )" } }
Now I tried to pull data from grafana dashboard to use the above datasource in "query inspector" and get the below "OAUTH login " response
Now try to use the sa prom to do the API query from the client also get the same login page
I don't understand the logic here, I use the same sa "prom", can do the granfan admin api and can do the prometheus query api directly, why it could not work when I add it to grafana datasource and pull data from grafana as proxy ?
I double checked the "OAUTH login " returned from prom-proxy and its logs as below: 2019/08/08 14:13:46 provider.go:382: authorizer reason: no RBAC policy matched 2019/08/08 14:13:50 provider.go:382: authorizer reason: no RBAC policy matched 2019/08/08 14:13:52 provider.go:382: authorizer reason: no RBAC policy matched