vcenterreceiver

package module
v0.107.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

README

vCenter Receiver

Status
Stability alpha: metrics
Distributions contrib
Issues Open issues Closed issues
Code Owners @djaglowski, @schmikei, @StefanKurek | Seeking more code owners!

This receiver fetches metrics from a vCenter or ESXi host running VMware vSphere APIs.

Prerequisites

This receiver has been built to support ESXi and vCenter versions:

  • 8
  • 7.0

A “Read Only” user assigned to a vSphere with permissions to the vCenter server, cluster and all subsequent resources being monitored must be specified in order for the receiver to retrieve information about them.

Configuration

Parameter Default Type Notes
endpoint String Endpoint to the vCenter Server or ESXi host that has the sdk path enabled. Required. The expected format is <protocol>://<hostname>

i.e: https://vcsa.hostname.localnet
username String Required
password String Required
tls TLSClientSetting Not Required. Will use defaults for configtls.ClientConfig. By default insecure settings are rejected and certificate verification is on.
collection_interval 2m Duration This receiver collects metrics on an interval. If the vCenter is fairly large, this value may need to be increased. Valid time units are ns, us (or µs), ms, s, m, h
initial_delay 1s Duration Defines how long this receiver waits before starting.
Example Configuration
receivers:
  vcenter:
    endpoint: http://localhost:15672
    username: otelu
    password: ${env:VCENTER_PASSWORD}
    collection_interval: 5m
    initial_delay: 1s
    metrics: []

The full list of settings exposed for this receiver are documented here with detailed sample configurations here. TLS config is documented further under the opentelemetry collector's configtls package.

Metrics

Details about the metrics produced by this receiver can be found in metadata.yaml with further documentation in documentation.md

Feature gates

ALPHA: receiver.vcenter.resourcePoolMemoryUsageAttribute

The feature gate receiver.vcenter.resourcePoolMemoryUsageAttribute once enabled will enable the memory usage type attribute for the vcenter.resource_pool.memory.usage metric.

This feature gate will eventually be enabled by default, and eventually the old implementation will be removed. It aims to give users time to migrate to the new implementation. The target release for this featuregate to be enabled by default is v0.107.0.

Documentation

Overview

Copyright The OpenTelemetry Authors SPDX-License-Identifier: Apache-2.0

Index

Constants

View Source
const (
	VSANQueryTypeClusters        vSANQueryType = "cluster-domclient:*"
	VSANQueryTypeHosts           vSANQueryType = "host-domclient:*"
	VSANQueryTypeVirtualMachines vSANQueryType = "virtual-machine:*"
)

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() receiver.Factory

NewFactory returns the receiver factory for the vcenterreceiver

Types

type Config

type Config struct {
	scraperhelper.ControllerConfig `mapstructure:",squash"`
	configtls.ClientConfig         `mapstructure:"tls,omitempty"`
	metadata.MetricsBuilderConfig  `mapstructure:",squash"`
	Endpoint                       string              `mapstructure:"endpoint"`
	Username                       string              `mapstructure:"username"`
	Password                       configopaque.String `mapstructure:"password"`
}

Config is the configuration of the receiver

func (*Config) SDKUrl

func (c *Config) SDKUrl() (*url.URL, error)

SDKUrl returns the url for the vCenter SDK

func (*Config) Validate

func (c *Config) Validate() error

Validate checks to see if the supplied config will work for the receiver

type DatacenterStats

type DatacenterStats struct {
	ClusterStatusCounts map[types.ManagedEntityStatus]int64
	HostStats           map[string]map[types.ManagedEntityStatus]int64
	VMStats             map[string]map[types.ManagedEntityStatus]int64
	DatastoreCount      int64
	DiskCapacity        int64
	DiskFree            int64
	CPULimit            int64
	MemoryLimit         int64
}

type PerfMetricsQueryResult

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

PerfMetricsQueryResult contains performance metric related data

type VSANMetricDetails

type VSANMetricDetails struct {
	// Contains the metric label
	MetricLabel string
	// Contains the metric interval in seconds
	Interval int32
	// Contains timestamps for all metric values
	Timestamps []*time.Time
	// Contains all values for vSAN metric label
	Values []int64
}

VSANMetricDetails contains vSAN metric data for a single metric

type VSANMetricResults

type VSANMetricResults struct {
	// Contains UUID info for related resource
	UUID string
	// Contains returned metric value info for all metrics
	MetricDetails []*VSANMetricDetails
}

VSANMetricResults contains vSAN metric related data for a single resource

type VSANQueryResults

type VSANQueryResults struct {
	// Contains vSAN metric data keyed by UUID string
	MetricResultsByUUID map[string]*VSANMetricResults
}

VSANQueryResults contains all returned vSAN metric related data

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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