Skip to content
Grafana instance, which use OAuth token for OpenShift. 📊 📊 📊
Shell Dockerfile
Branch: master
Clone or download
Eldad Marciano
Eldad Marciano update grafana image
Latest commit b890ac9 Dec 13, 2018

Openshift Grafana Dashboards

Research repository, see the origin page for official example

Available Dashboards

  • openshift cluster metrics
  • node exporter metrics

To deploy grafana

Note: make sure to have openshift prometheus deployed. (

./ -n prometheus -a -e

when you being asked to type username \ password, type 'grafana' and login with the same cerdentials

How to use oauth proxy:

Note: when using oauth make sure your user has permission to browse grafana.

  • add a openshift user htpasswd htpasswd -c /etc/origin/master/htpasswd gfadmin
  • use the HTPasswdPasswordIdentityProvider as described here -
  • make sure point the provider file to /etc/origin/master/htpasswd. or using this example cmd:
    sed -ie 's|AllowAllPasswordIdentityProvider|HTPasswdPasswordIdentityProvider\n      file: /etc/origin/master/htpasswd|' /etc/origin/master/master-config.yaml
  • add view role to user oc adm policy add-cluster-role-to-user cluster-reader gfadmin
  • restart master api systemctl restart atomic-openshift-master-api.service
  • get the grafana url by oc get route
  • discover your openshift dashboard.

Deploy grafana manually


  1. oc create project grafana
  2. oc new-app -f grafana-ocp.yaml
  3. oc expose svc grafana-ocp
  4. grab the grafana url oc get route |awk 'NR==2 {print $2}'
  5. grab the ocp token, from openshift master run: oc sa get-token management-admin -n management-infra
  6. browse to grafana via browser and add new prometheus DS to grafana.
  7. paste the token string at the token field.
  8. checkout the TLS checkbox.
  9. save & test and make sure all green.

Pull standalone docker grafana instance

  1. docker pull
  2. docker run -d -ti -p 3000:3000 mrsiano/openshift-grafana "./bin/grafana-server"

Build and run the docker image

  1. docker build -t grafana-ocp .
  2. docker run -d -ti -p 3000:3000 grafana-ocp "./bin/grafana-server"


You can’t perform that action at this time.