vccollector

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VcCache

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

type VcCollector

type VcCollector struct {
	tls.ClientConfig

	VcCache
	// contains filtered or unexported fields
}

VcCollector struct contains session and entities of a vCenter

func New added in v0.1.7

func New(
	vcenterURL, user, pass string,
	clicfg *tls.ClientConfig,
	dataDuration time.Duration,
) (*VcCollector, error)

New returns a new VcCollector associated with the provided vCenter URL

func (*VcCollector) Close

func (c *VcCollector) Close()

Close closes vCenter connection

func (*VcCollector) CollectClusterInfo

func (c *VcCollector) CollectClusterInfo(
	ctx context.Context,
	acc telegraf.Accumulator,
) error

CollectClusterInfo gathers cluster info

func (*VcCollector) CollectDatacenterInfo

func (c *VcCollector) CollectDatacenterInfo(
	ctx context.Context,
	acc telegraf.Accumulator,
) error

CollectDatacenterInfo gathers datacenter info

func (*VcCollector) CollectDatastoresInfo

func (c *VcCollector) CollectDatastoresInfo(
	ctx context.Context,
	acc telegraf.Accumulator,
) error

CollectDatastoresInfo gathers info for all datastores in the datacenter (like govc datastore.info)

func (*VcCollector) CollectHostFw

func (c *VcCollector) CollectHostFw(
	ctx context.Context,
	acc telegraf.Accumulator,
) error

CollectHostFw gathers host Firewall info (like govc: host.esxcli network firewall get)

func (*VcCollector) CollectHostGraphics added in v0.1.8

func (c *VcCollector) CollectHostGraphics(
	ctx context.Context,
	acc telegraf.Accumulator,
) error

CollectHostGraphics gathers host graphics device stats

func (*VcCollector) CollectHostHBA

func (c *VcCollector) CollectHostHBA(
	ctx context.Context,
	acc telegraf.Accumulator,
) error

CollectHostHBA gathers host HBA info (like govc: storage core adapter list)

func (*VcCollector) CollectHostInfo

func (c *VcCollector) CollectHostInfo(
	ctx context.Context,
	acc telegraf.Accumulator,
) error

CollectHostInfo gathers host info

func (*VcCollector) CollectHostNIC

func (c *VcCollector) CollectHostNIC(
	ctx context.Context,
	acc telegraf.Accumulator,
) error

CollectHostNIC gathers host NIC info (like govc: host.esxcli network nic list)

func (*VcCollector) CollectHostServices added in v0.1.9

func (c *VcCollector) CollectHostServices(
	ctx context.Context,
	acc telegraf.Accumulator,
) error

CollectHostServices gathers host services info (like govc: host.service.ls)

func (*VcCollector) CollectNetDVP

func (c *VcCollector) CollectNetDVP(
	ctx context.Context,
	acc telegraf.Accumulator,
) error

CollectNetDVP gathers Distributed Virtual Portgroup info

func (*VcCollector) CollectNetDVS

func (c *VcCollector) CollectNetDVS(
	ctx context.Context,
	acc telegraf.Accumulator,
) error

CollectNetDVS gathers Distributed Virtual Switch info

func (*VcCollector) CollectVcenterInfo

func (c *VcCollector) CollectVcenterInfo(
	ctx context.Context,
	acc telegraf.Accumulator,
) error

CollectVcenterInfo gathers basic vcenter info

func (*VcCollector) CollectVmsInfo

func (c *VcCollector) CollectVmsInfo(
	ctx context.Context,
	acc telegraf.Accumulator,
) error

CollectVmsInfo gathers basic virtual machine info

func (*VcCollector) GetNumberNotRespondingHosts

func (c *VcCollector) GetNumberNotRespondingHosts() int

GetNumberNotRespondingHosts returns the number of hosts connected but not responding to esxcli commands

func (*VcCollector) IsActive

func (c *VcCollector) IsActive(ctx context.Context) bool

IsActive returns if the vCenter connection is active or not

func (*VcCollector) IsHostConnected

func (c *VcCollector) IsHostConnected(dc *object.Datacenter, host *object.HostSystem) bool

func (*VcCollector) Open

func (c *VcCollector) Open(timeout time.Duration) error

Open opens a vCenter connection session or relogin if session already exists

func (*VcCollector) ReportHostEsxcliResponse

func (c *VcCollector) ReportHostEsxcliResponse(
	ctx context.Context,
	acc telegraf.Accumulator,
) error

ReportHostEsxcliResponse reports metrics about host esxcli command responses

func (*VcCollector) ResetResponseTimes added in v0.2.0

func (c *VcCollector) ResetResponseTimes()

ResetResponseTimes set host states response times to 0

func (*VcCollector) SetDataDuration

func (c *VcCollector) SetDataDuration(du time.Duration)

SetDataDuration sets max cache data duration

func (*VcCollector) SetFilterClusters added in v0.1.10

func (c *VcCollector) SetFilterClusters(include []string, exclude []string) error

SetFilterClusters sets clusters include and exclude filters

func (*VcCollector) SetFilterHosts added in v0.1.10

func (c *VcCollector) SetFilterHosts(include []string, exclude []string) error

SetFilterHosts sets hosts include and exclude filters

func (*VcCollector) SetFilterVms added in v0.1.10

func (c *VcCollector) SetFilterVms(include []string, exclude []string) error

SetFilterVms sets VMs include and exclude filters

func (*VcCollector) SetMaxResponseTime added in v0.1.11

func (c *VcCollector) SetMaxResponseTime(du time.Duration)

SetMaxResponseTime sets max response time to consider an esxcli command as notresponding

func (*VcCollector) SetQueryChunkSize added in v0.1.7

func (c *VcCollector) SetQueryChunkSize(b int)

SetQueryChunkSize sets chunk size of slice to use in sSphere property queries

func (*VcCollector) SetSkipHostNotRespondingDuration

func (c *VcCollector) SetSkipHostNotRespondingDuration(du time.Duration)

SetSkipHostNotRespondingDuration sets time to skip not responding to esxcli commands hosts

Jump to

Keyboard shortcuts

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