Grafana Visualization


This guide assumes you have already and up and running Grafana service. If you do not have already Grafana installed, follow the follwoing guides:


Prometheus is listening in the standard port (9090) as described in the installation guide.

Grafana Dashboards

We provide three dashboard templates that can be customized to your needs:
  • Dashboard to visualize Virtual Machine information /usr/share/one/grafana/dashboards/vms.json.

  • Dashboard to visualize Host information /usr/share/one/grafana/dashboards/hosts.json.

  • Dashboard to visualize the overall status of the OpenNebula cloud /usr/share/one/grafana/dashboards/opennebula.json.

You can easily import these dashboards by copying the contents of these files in the Dashboards > + Import form.

The Virtual Machine and Host dashboards are by default indexed by ID but it can easily changed in the Settings > Variables dialog to use one_vm_name and one_host_name, respectively.


Grafana Provisioning

Grafana supports provisioning which can be used to automatically reconfigure Grafana instances in shell scripts or automation engines like ansible.

In case of OpenNebula you can use it to for example configure datasources and dashboards:

mkdir -p /etc/grafana/provisioning/datasources/
cat >/etc/grafana/provisioning/datasources/prometheus.yml <<'EOF'
apiVersion: 1
- name: prometheus
  type: prometheus
  access: proxy
  url: http://localhost:9090
  isDefault: true
  editable: false


In the case your Grafana instance is running along Prometheus on the same OpenNebula server, then the http://localhost:9090 above can be utilized with ssh tunneling:

ssh -L 9090:localhost:9090 user@opennebula-server-running-prometheus

Otherwise, provide FQDN or IP address and make sure you can access Prometheus instance from your web browser.

mkdir -p /etc/grafana/provisioning/dashboards/
cat >/etc/grafana/provisioning/dashboards/opennebula.yml <<'EOF'
apiVersion: 1
- name: opennebula
  type: file
  folder: ONE
  options: { path: /usr/share/one/grafana/dashboards/ }
systemctl restart grafana-server.service

After the grafana-server.service restarts you should be able to connect and verify that the prometheus datasource is operational and OpenNebula dashboards show live data.

Please refer to the official documentation to learn more about Grafana provisioning.