vmwarecollector

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2020 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterFromID

func ClusterFromID(client *govmomi.Client, id string) (*object.ClusterComputeResource, error)

ClusterFromID returns a ClusterComputeResource, a subclass of ComputeResource that is used for clusters.

func ClusterFromRef

ClusterFromRef TODO Comment

func GetClusters

func GetClusters(ctx context.Context, c *govmomi.Client, lst *[]mo.ClusterComputeResource) error

GetClusters TODO Comment

func GetMetricMap

func GetMetricMap(ctx context.Context, client *govmomi.Client) (MetricMap map[string]int32)

GetMetricMap TODO Comment

func GetVMLineage

GetVMLineage gets the parent and grandparent ManagedEntity objects

func NewClient

func NewClient(ctx context.Context) (*govmomi.Client, error)

NewClient Connect to vCenter

func PerfQuery

func PerfQuery(ctx context.Context, c *govmomi.Client, metrics []string, entity mo.ManagedEntity, nameToID map[string]int32, idToName map[int32]string) map[string]int64

PerfQuery TODO Comment

Types

type Collector

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

Collector TODO Comment

func NewCollector

func NewCollector() *Collector

NewCollector TODO Comment

func (*Collector) Collect

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

Collect is called by the Prometheus registry when collecting metrics.

func (*Collector) Describe

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

Describe sends the super-set of all possible descriptors of metrics collected by this Collector.

type VMetric

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

VMetric TODO Comment

func ClusterMetrics

func ClusterMetrics(ch chan<- prometheus.Metric, objDC mo.Datacenter) []VMetric

ClusterMetrics TODO Comment

func DatacenterMetrics

func DatacenterMetrics(ch chan<- prometheus.Metric) []VMetric

DatacenterMetrics TODO Comment

func DatastoreMetrics

func DatastoreMetrics(objDC mo.Datacenter) []VMetric

DatastoreMetrics TODO Comment

func HostCounters added in v0.3.0

func HostCounters() []VMetric

HostCounters Collects Hypervisor counters per Host

func HostHBAStatus

func HostHBAStatus() []VMetric

HostHBAStatus Report status of the HBA attached to a hypervisor to be able to monitor if a hba goes offline

func HostMetrics

func HostMetrics() []VMetric

HostMetrics Collects Hypervisor metrics

func VirtualMachineMetrics added in v0.3.0

func VirtualMachineMetrics() []VMetric

VirtualMachineMetrics TODO Comment

Jump to

Keyboard shortcuts

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