Recipe for setting up metrics and grafana
- Setup hawkular with OpenShift. For local deployment, doing
oc cluster up --metricsshould be enough. For advanced install, see https://docs.openshift.org/latest/install_config/cluster_metrics.html - Make sure your user is setup with cluster-admin privileges (either oc login -u system:admin or use oc --config
) - Select the openshift-infra project (using default is also OK, but I usually deploy all the metrics stuff in openshift-infra)
- Deploy hawkular-openshift-agent for collecting metrics from EnMasse. Follow the instructions at https://github.com/openshift/origin-metrics#deploying-the-hawkular-openshift-agent (NOTE: When processing the hawkular-openshift-agent template, set IMAGE_VERSION=1.4.0.Final to ensure that it doesn't crash when handling mbean wildcards)
- Deploy EnMasse to desired project/namespace
- Deploy the hawkular-grafana using one of these templates: https://github.com/hawkular/hawkular-grafana-datasource/tree/master/docker/openshift . This will build the whole thing from source, so takes a while
- When the hawkular-grafana deployment is done, a route has been created (oc get route -n openshift-infra to list). Go to the exposed route, login (admin/admin)
- Setup a new data source with type hawkular (host found in the openshift-infra project, I had to use the service ip from 'oc get service hawkular-metrics -n openshift-infra' since it was unable to resolve the metrics route host), and configure it with tenant:
and password: (oc whoami -t) - You can now create dashboards and select metrics coming from brokers. An example dashboard can be found here: https://github.com/EnMasseProject/enmasse/blob/master/documentation/grafana/dashboard.json