exporter

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectDomain

func CollectDomain(ch chan<- prometheus.Metric, l *libvirt.Libvirt, domain domainMeta, logger log.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 log.Logger) (err error)

func CollectDomainMemoryStatInfo added in v1.5.0

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

func CollectDomainNetworkInfo

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

func CollectDomainVCPUInfo added in v1.5.0

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

func CollectFromLibvirt

func CollectFromLibvirt(ch chan<- prometheus.Metric, uri string, driver libvirt.ConnectURI, logger log.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 log.Logger) (err error)

func DomainsFromLibvirt

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

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

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 log.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