vm

package
v0.0.0-...-b524ce4 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCollector

func NewCollector(ctx context.Context, cc *collector.CollectorContext, collectSnaphots, collectNetwork bool, collectDisks bool, collectDuration prometheus.Observer) prometheus.Collector

NewCollector creates a new collector

Types

type DiskAttachment

type DiskAttachment struct {
	LogicalName string    `xml:"logical_name"`
	Disk        disk.Disk `xml:"disk"`
}

DiskAttachment represents the diskattachment resource

type DiskAttachments

type DiskAttachments struct {
	Attachment []DiskAttachment `xml:"disk_attachment"`
}

DiskAttachments is a collection of diskattachments

type Snapshot

type Snapshot struct {
	ID                 string    `xml:"id,attr"`
	Description        string    `xml:"description"`
	Date               time.Time `xml:"date"`
	PersistMemorystate bool      `xml:"persist_memorystate"`
	Status             string    `json:"snapshot_status"`
	Type               string    `json:"snapshot_type"`
}

Snapshot repesents the snapshot resource

type Snapshots

type Snapshots struct {
	Snapshot []Snapshot `xml:"snapshot"`
}

Snapshots is a collection of snapshots

type VM

type VM struct {
	ID   string `xml:"id,attr"`
	Name string `xml:"name"`
	Host struct {
		ID string `xml:"id,attr"`
	} `xml:"host,omitempty"`
	Cluster struct {
		ID string `xml:"id,attr"`
	} `xml:"cluster,omitempty"`
	Status string `xml:"status"`
	CPU    struct {
		Topology struct {
			Cores   int `xml:"cores"`
			Sockets int `xml:"sockets"`
			Threads int `xml:"threads"`
		} `xml:"topology"`
	} `xml:"cpu"`
	HasIllegalImages bool `xml:"has_illegal_images"`
}

VM represents the virutal machine resource

type VMCollector

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

VMCollector collects virtual machine statistics from oVirt

func (*VMCollector) Collect

func (c *VMCollector) Collect(ch chan<- prometheus.Metric)

Collect implements Prometheus Collector interface

func (*VMCollector) Describe

func (c *VMCollector) Describe(ch chan<- *prometheus.Desc)

Describe implements Prometheus Collector interface

type VMs

type VMs struct {
	VMs []VM `xml:"vm"`
}

VMs is a collection of virtual machines

Jump to

Keyboard shortcuts

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