Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.
/ hyperv_exporter Public archive

Prometheus exporter for Hyper-V Server

License

Notifications You must be signed in to change notification settings

lpsouza/hyperv_exporter

Repository files navigation

hyperv_exporter

Exporter for Prometheus developed in C# (.NET Core) for information on Hyper-V servers like:

  • CPU usage
  • Total and available memory
  • Total and available disk
  • Total traffic for each network interface
  • Count of total VMs
  • Count od total running VMs

Most of the information is obtained directly from Hyper-V Server performance counters.

How to install

At .NET core 3.0 developer workstation:

  1. Clone this repository;
  2. Reinitialize submodules: git submodule init
  3. Restore submodule: git submodule update
  4. Inside the project folder run: publish.cmd;
    • This batch script build two distinct versions (64 bits):
      • win10-x64: For Windows Server 2016 64 or late.
      • win81-x64: For Windows Server 2012 R2
    • The output folder is .\publish\version\
  5. Get the correct version and copy to a folder on Hyper-V Server;
  6. On Hyper-V Server, in the release folder, run: install_service.ps1

Test if service is running

Sample config to prometheus.yml

scrape_configs:
  - job_name: 'HYPERV-SERVER'
    static_configs:
    - targets: [
      'HYPERV-SERVER:9182'