pve

package
v0.0.0-...-ecdc599 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pve

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

object used to interact with a Proxmox instance

func New

func New(cfg *config.Config) *Pve

return a Pve instance.

func (*Pve) CurrentKVMs

func (p *Pve) CurrentKVMs() VMs

return a map containing the currently running KVMs

func (*Pve) CurrentLXCs

func (p *Pve) CurrentLXCs() VMs

return a map containing the currently running LXCs

func (*Pve) CurrentVMs

func (p *Pve) CurrentVMs() VMs

return a map containing the currently running LXCs and KVMs

func (*Pve) RefreshVMsMonitoring

func (p *Pve) RefreshVMsMonitoring()

refresh the map of running VMs

func (*Pve) RemoveVM

func (p *Pve) RemoveVM(id int)

remove a VM from the list of known VMs

func (*Pve) RunKeptAliveProcess

func (p *Pve) RunKeptAliveProcess(vm *VM, forever bool) error

run a command inside a VM and parse its output that will be sent to a OTLP collector

func (*Pve) Start

func (p *Pve) Start()

start managing monitoring processes

func (*Pve) StartVMMonitoring

func (p *Pve) StartVMMonitoring(vm *VM)

run the monitoring process of a VM

func (*Pve) Stop

func (p *Pve) Stop()

stop all running monitoring processes

func (*Pve) StopVMMonitoring

func (p *Pve) StopVMMonitoring(id int)

stop the monitoring process of a VM

func (*Pve) UpdateVM

func (p *Pve) UpdateVM(vm *VM) *VM

add the received VM to the list of known VMs, creating its logger service if needed

type VM

type VM struct {
	Id          int
	Name        string
	Type        string
	MonitorCmd  string
	MonitorArgs []string
	Running     bool
	Logger      *ologgers.OLogger
	StopProcess func()
	LastError   *error
}

configuration used to monitor a VM

type VMs

type VMs map[int]*VM

map of VMID to VM information

Jump to

Keyboard shortcuts

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