Skip to content

6G-SANDBOX/power_monitoring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VIRTUAL MACHINE ENERGY POWER MONITORING

Contributors Forks Stargazers Issues

6G-SANDBOX

POWER MONITORING

🛠️ Installation Guide

This project enables energy metrics collection on virtual machines using Scaphandre, a lightweight agent in C for VM monitoring, and a custom Grafana dashboard. Follow the steps below to configure your environment correctly.


⚙️ Prerequisites

  • Ensure the QEMU guest agent is running inside each virtual machine (VM).
  • OpenNebula Frontends (FE) must be accessible and configured to support custom Prometheus collectors.

1. Install Scaphandre (on the physical host)

  1. Download the latest release of the official Scaphandre package from GitHub and install on every OpenNebula Host:
    👉 https://github.com/hubblo-org/scaphandre/releases

  2. Deploy the systemd service file for Scaphandre:

    • You can copy it from a host where Scaphandre is already installed.
    • If Scaphandre is deployed via Docker, ensure the systemd configuration matches your container setup.
  3. Configure the target port:

    • Add the following environment variable in the host’s configuration:
      #/etc/default/scaphandre
      SCAPHANDRE_PROMETHEUS_PORT=9930

2. Deploy the C Agent (inside each VM)

Install the custom VM monitoring agent inside every VM:

  1. Clone the repository:

    git clone https://github.com/6G-SANDBOX/power_monitoring
  2. Build and run the agent inside the VM following the instructions provided in the get_proc_ticks folder.


3. Update OpenNebula Prometheus Collectors (on Frontends)

  1. Copy the modified Prometheus collector files to:

    /usr/lib/one/opennebula_exporter
  2. Restart the OpenNebula Prometheus exporter service:

    systemctl restart opennebula-prometheus

4. Import Grafana Dashboard

  1. Open your Grafana instance.
  2. Go to the sidebar and click Dashboards → Import.
  3. Select or paste the contents of the JSON file with the dashboard definition.
  4. Choose the appropriate Prometheus data source.
  5. Click Import to load the dashboard.

General View

Detailed View

Contributors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published