exporter

package
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectAdditionalDomainBlockDeviceInfo added in v1.7.0

func CollectAdditionalDomainBlockDeviceInfo(ch chan<- prometheus.Metric, l *libvirt.Libvirt, domain domainMeta, promLabels []string, logger *slog.Logger) (err error)

func CollectDomain

func CollectDomain(ch chan<- prometheus.Metric, l *libvirt.Libvirt, domain domainMeta, logger *slog.Logger) (err error)

CollectDomain extracts Prometheus metrics from a libvirt domain.

func CollectDomainBlockDeviceInfo

func CollectDomainBlockDeviceInfo(ch chan<- prometheus.Metric, l *libvirt.Libvirt, domain domainMeta, promLabels []string, logger *slog.Logger) (err error)

func CollectDomainJobInfo added in v1.7.0

func CollectDomainJobInfo(ch chan<- prometheus.Metric, l *libvirt.Libvirt, domain domainMeta, promLabels []string, logger *slog.Logger) (err error)

func CollectDomainMemoryStatInfo added in v1.5.0

func CollectDomainMemoryStatInfo(ch chan<- prometheus.Metric, l *libvirt.Libvirt, domain domainMeta, promLabels []string, logger *slog.Logger) (err error)

func CollectDomainNetworkInfo

func CollectDomainNetworkInfo(ch chan<- prometheus.Metric, l *libvirt.Libvirt, domain domainMeta, promLabels []string, logger *slog.Logger) (err error)

func CollectDomainVCPUInfo added in v1.5.0

func CollectDomainVCPUInfo(ch chan<- prometheus.Metric, l *libvirt.Libvirt, domain domainMeta, promLabels []string, logger *slog.Logger) (err error)

func CollectFromLibvirt

func CollectFromLibvirt(ch chan<- prometheus.Metric, uri string, driver libvirt.ConnectURI, logger *slog.Logger) (err error)

CollectFromLibvirt obtains Prometheus metrics from all domains in a libvirt setup.

func CollectStoragePoolInfo added in v1.5.0

func CollectStoragePoolInfo(ch chan<- prometheus.Metric, l *libvirt.Libvirt, pool libvirt.StoragePool, logger *slog.Logger) (err error)

func DomainsFromLibvirt

func DomainsFromLibvirt(l *libvirt.Libvirt, logger *slog.Logger) ([]domainMeta, error)

DomainFromLibvirt retrives all domains from the libvirt socket and enriches them with some meta information.

func GenerateAdditionalBlockMetrics added in v1.7.0

func GenerateAdditionalBlockMetrics(ch chan<- prometheus.Metric, prometheusDiskLabels []string, capacity uint64, flushRequests uint64, flushTimes uint64, readTime uint64, writeTime uint64)

Types

type LibvirtExporter

type LibvirtExporter struct {
	// contains filtered or unexported fields
}

LibvirtExporter implements a Prometheus exporter for libvirt state.

func NewLibvirtExporter

func NewLibvirtExporter(uri string, driver libvirt.ConnectURI, logger *slog.Logger) (*LibvirtExporter, error)

NewLibvirtExporter creates a new Prometheus exporter for libvirt.

func (*LibvirtExporter) Collect

func (e *LibvirtExporter) Collect(ch chan<- prometheus.Metric)

Collect scrapes Prometheus metrics from libvirt.

func (*LibvirtExporter) Describe

func (e *LibvirtExporter) Describe(ch chan<- *prometheus.Desc)

Describe returns metadata for all Prometheus metrics that may be exported.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL