Categorygithub.com/nee541/libvirt-exporter
modulepackage
0.0.0-20240615153232-e96d73c82e53
Repository: https://github.com/nee541/libvirt-exporter.git
Documentation: pkg.go.dev

# README

Prometheus libvirt exporter

Introduction

The Prometheus libvirt exporter utilizes the go-libvirt module from DigitalOcean to establish a pure Golang interface for interacting with libvirt. This exporter is built to collect metrics from virtual machines within libvirt and expose them through an HTTP service and the Prometheus interface.

Usage

You can directly download the executable program for the corresponding computer architecture from the "releases" section to run locally and collect virtual machine metrics. Alternatively, you can download the source code and compile it into an executable program for execution. We also provide a Dockerfile for reference, which can package this exporter into an image for easier use.

Metrics explain

The metrics provided by the Prometheus libvirt exporter consist of four types: CPU, memory, network, and disk metrics. The table below introduces these metrics from three aspects: metric name, metric meaning, and the corresponding go-libvirt interface. This information is provided to facilitate both a convenient and in-depth understanding of the specific meanings of these metrics.

Metrics NameMetrics MeaningGo-libvirt Interface
libvirt_domain_cpu_seconds_totalTotal CPU time spent in secondsDomainGetInfo
libvirt_domain_cpu_vcpu_numberVirtual CPU numberDomainGetInfo
libvirt_domain_memory_stat_swapIn_bytesMemory swap in bytesDomainMemoryStats
libvirt_domain_memory_stat_swapOut_bytesMemory swap out bytesDomainMemoryStats
libvirt_domain_memory_stat_major_fault_pagesMemory major fault pagesDomainMemoryStats
libvirt_domain_memory_stat_minor_fault_pagesMemory minor fault pagesDomainMemoryStats
libvirt_domain_memory_stat_unused_bytesMemory unused bytesDomainMemoryStats
libvirt_domain_memory_stat_available_bytesMemory available bytesDomainMemoryStats
libvirt_domain_memory_stat_actual_balloon_bytesMemory actual balloon bytesDomainMemoryStats
libvirt_domain_memory_stat_rss_bytesMemory rss bytesDomainMemoryStats
libvirt_domain_memory_stat_usable_bytesMemory usable bytesDomainMemoryStats
libvirt_domain_memory_stat_last_update_timestampMemory last update timestampDomainMemoryStats
libvirt_domain_memory_stat_disk_cache_bytesMemory disk cache bytesDomainMemoryStats
libvirt_domain_memory_stat_hugetlb_alloc_pagesMemory hugetlb alloc pagesDomainMemoryStats
libvirt_domain_memory_stat_hugetlb_fail_pagesMemory hugetlb fail pagesDomainMemoryStats
libvirt_domain_interface_receive_bytes_totalTotal number of bytes receivedDomainInterfaceStats
libvirt_domain_interface_receive_packets_totalTotal number of packets receivedDomainInterfaceStats
libvirt_domain_interface_receive_errors_totalTotal number of errors receivedDomainInterfaceStats
libvirt_domain_interface_receive_drops_totalTotal number of drops receivedDomainInterfaceStats
libvirt_domain_interface_transmit_bytes_totalTotal number of bytes transmittedDomainInterfaceStats
libvirt_domain_interface_transmit_packets_totalTotal number of packets transmittedDomainInterfaceStats
libvirt_domain_interface_transmit_errors_totalTotal number of errors transmittedDomainInterfaceStats
libvirt_domain_interface_transmit_drops_totalTotal number of drops transmittedDomainInterfaceStats
libvirt_domain_block_read_bytes_totalTotal number of bytes readDomainBlockStats
libvirt_domain_block_read_requests_totalTotal number of requests readDomainBlockStats
libvirt_domain_block_write_bytes_totalTotal number of bytes writtenDomainBlockStats
libvirt_domain_block_write_requests_totalTotal number of requests writtenDomainBlockStats
libvirt_domain_block_capacity_bytesTotal number of capacity bytesDomainGetBlockInfo
libvirt_domain_block_allocation_bytesTotal number of allocation bytesDomainGetBlockInfo
libvirt_domain_block_physical_bytesTotal number of physical bytesDomainGetBlockInfo

# Packages

No description provided by the author
No description provided by the author