Documentation ¶
Index ¶
- Variables
- func WithStartTime(startTime pcommon.Timestamp) metricBuilderOption
- type AttributeDiskDirection
- type AttributeDiskState
- type AttributeDiskType
- type AttributeLatencyType
- type AttributeThroughputDirection
- type AttributeVMCountPowerState
- type MetricSettings
- type MetricsBuilder
- func (mb *MetricsBuilder) Emit(rmo ...ResourceMetricsOption) pmetric.Metrics
- func (mb *MetricsBuilder) EmitForResource(rmo ...ResourceMetricsOption)
- func (mb *MetricsBuilder) RecordVcenterClusterCPUEffectiveDataPoint(ts pcommon.Timestamp, val int64)
- func (mb *MetricsBuilder) RecordVcenterClusterCPULimitDataPoint(ts pcommon.Timestamp, val int64)
- func (mb *MetricsBuilder) RecordVcenterClusterHostCountDataPoint(ts pcommon.Timestamp, val int64, hostEffectiveAttributeValue bool)
- func (mb *MetricsBuilder) RecordVcenterClusterMemoryEffectiveDataPoint(ts pcommon.Timestamp, val int64)
- func (mb *MetricsBuilder) RecordVcenterClusterMemoryLimitDataPoint(ts pcommon.Timestamp, val int64)
- func (mb *MetricsBuilder) RecordVcenterClusterMemoryUsedDataPoint(ts pcommon.Timestamp, val int64)
- func (mb *MetricsBuilder) RecordVcenterClusterVMCountDataPoint(ts pcommon.Timestamp, val int64, ...)
- func (mb *MetricsBuilder) RecordVcenterDatastoreDiskUsageDataPoint(ts pcommon.Timestamp, val int64, diskStateAttributeValue AttributeDiskState)
- func (mb *MetricsBuilder) RecordVcenterDatastoreDiskUtilizationDataPoint(ts pcommon.Timestamp, val float64)
- func (mb *MetricsBuilder) RecordVcenterHostCPUUsageDataPoint(ts pcommon.Timestamp, val int64)
- func (mb *MetricsBuilder) RecordVcenterHostCPUUtilizationDataPoint(ts pcommon.Timestamp, val float64)
- func (mb *MetricsBuilder) RecordVcenterHostDiskLatencyAvgDataPoint(ts pcommon.Timestamp, val int64, ...)
- func (mb *MetricsBuilder) RecordVcenterHostDiskLatencyMaxDataPoint(ts pcommon.Timestamp, val int64)
- func (mb *MetricsBuilder) RecordVcenterHostDiskThroughputDataPoint(ts pcommon.Timestamp, val int64, ...)
- func (mb *MetricsBuilder) RecordVcenterHostMemoryUsageDataPoint(ts pcommon.Timestamp, val int64)
- func (mb *MetricsBuilder) RecordVcenterHostMemoryUtilizationDataPoint(ts pcommon.Timestamp, val float64)
- func (mb *MetricsBuilder) RecordVcenterHostNetworkPacketCountDataPoint(ts pcommon.Timestamp, val int64, ...)
- func (mb *MetricsBuilder) RecordVcenterHostNetworkPacketErrorsDataPoint(ts pcommon.Timestamp, val int64, ...)
- func (mb *MetricsBuilder) RecordVcenterHostNetworkThroughputDataPoint(ts pcommon.Timestamp, val int64, ...)
- func (mb *MetricsBuilder) RecordVcenterHostNetworkUsageDataPoint(ts pcommon.Timestamp, val int64)
- func (mb *MetricsBuilder) RecordVcenterResourcePoolCPUSharesDataPoint(ts pcommon.Timestamp, val int64)
- func (mb *MetricsBuilder) RecordVcenterResourcePoolCPUUsageDataPoint(ts pcommon.Timestamp, val int64)
- func (mb *MetricsBuilder) RecordVcenterResourcePoolMemorySharesDataPoint(ts pcommon.Timestamp, val int64)
- func (mb *MetricsBuilder) RecordVcenterResourcePoolMemoryUsageDataPoint(ts pcommon.Timestamp, val int64)
- func (mb *MetricsBuilder) RecordVcenterVMDiskLatencyAvgDataPoint(ts pcommon.Timestamp, val int64, ...)
- func (mb *MetricsBuilder) RecordVcenterVMDiskLatencyMaxDataPoint(ts pcommon.Timestamp, val int64)
- func (mb *MetricsBuilder) RecordVcenterVMDiskThroughputDataPoint(ts pcommon.Timestamp, val int64)
- func (mb *MetricsBuilder) RecordVcenterVMDiskUsageDataPoint(ts pcommon.Timestamp, val int64, diskStateAttributeValue AttributeDiskState)
- func (mb *MetricsBuilder) RecordVcenterVMDiskUtilizationDataPoint(ts pcommon.Timestamp, val float64)
- func (mb *MetricsBuilder) RecordVcenterVMMemoryBalloonedDataPoint(ts pcommon.Timestamp, val int64)
- func (mb *MetricsBuilder) RecordVcenterVMMemoryUsageDataPoint(ts pcommon.Timestamp, val int64)
- func (mb *MetricsBuilder) RecordVcenterVMNetworkPacketCountDataPoint(ts pcommon.Timestamp, val int64, ...)
- func (mb *MetricsBuilder) RecordVcenterVMNetworkThroughputDataPoint(ts pcommon.Timestamp, val int64, ...)
- func (mb *MetricsBuilder) RecordVcenterVMNetworkUsageDataPoint(ts pcommon.Timestamp, val int64)
- func (mb *MetricsBuilder) Reset(options ...metricBuilderOption)
- type MetricsSettings
- type ResourceMetricsOption
- func WithStartTimeOverride(start pcommon.Timestamp) ResourceMetricsOption
- func WithVcenterClusterName(val string) ResourceMetricsOption
- func WithVcenterDatastoreName(val string) ResourceMetricsOption
- func WithVcenterHostName(val string) ResourceMetricsOption
- func WithVcenterResourcePoolName(val string) ResourceMetricsOption
- func WithVcenterVMID(val string) ResourceMetricsOption
- func WithVcenterVMName(val string) ResourceMetricsOption
Constants ¶
This section is empty.
Variables ¶
var MapAttributeDiskDirection = map[string]AttributeDiskDirection{ "read": AttributeDiskDirectionRead, "write": AttributeDiskDirectionWrite, }
MapAttributeDiskDirection is a helper map of string to AttributeDiskDirection attribute value.
var MapAttributeDiskState = map[string]AttributeDiskState{ "available": AttributeDiskStateAvailable, "used": AttributeDiskStateUsed, }
MapAttributeDiskState is a helper map of string to AttributeDiskState attribute value.
var MapAttributeDiskType = map[string]AttributeDiskType{ "virtual": AttributeDiskTypeVirtual, "physical": AttributeDiskTypePhysical, }
MapAttributeDiskType is a helper map of string to AttributeDiskType attribute value.
var MapAttributeLatencyType = map[string]AttributeLatencyType{ "kernel": AttributeLatencyTypeKernel, "device": AttributeLatencyTypeDevice, }
MapAttributeLatencyType is a helper map of string to AttributeLatencyType attribute value.
var MapAttributeThroughputDirection = map[string]AttributeThroughputDirection{ "transmitted": AttributeThroughputDirectionTransmitted, "received": AttributeThroughputDirectionReceived, }
MapAttributeThroughputDirection is a helper map of string to AttributeThroughputDirection attribute value.
var MapAttributeVMCountPowerState = map[string]AttributeVMCountPowerState{ "on": AttributeVMCountPowerStateOn, "off": AttributeVMCountPowerStateOff, }
MapAttributeVMCountPowerState is a helper map of string to AttributeVMCountPowerState attribute value.
Functions ¶
func WithStartTime ¶
WithStartTime sets startTime on the metrics builder.
Types ¶
type AttributeDiskDirection ¶
type AttributeDiskDirection int
AttributeDiskDirection specifies the a value disk_direction attribute.
const ( AttributeDiskDirectionRead AttributeDiskDirection AttributeDiskDirectionWrite )
func (AttributeDiskDirection) String ¶
func (av AttributeDiskDirection) String() string
String returns the string representation of the AttributeDiskDirection.
type AttributeDiskState ¶
type AttributeDiskState int
AttributeDiskState specifies the a value disk_state attribute.
const ( AttributeDiskStateAvailable AttributeDiskState AttributeDiskStateUsed )
func (AttributeDiskState) String ¶
func (av AttributeDiskState) String() string
String returns the string representation of the AttributeDiskState.
type AttributeDiskType ¶
type AttributeDiskType int
AttributeDiskType specifies the a value disk_type attribute.
const ( AttributeDiskTypeVirtual AttributeDiskType AttributeDiskTypePhysical )
func (AttributeDiskType) String ¶
func (av AttributeDiskType) String() string
String returns the string representation of the AttributeDiskType.
type AttributeLatencyType ¶
type AttributeLatencyType int
AttributeLatencyType specifies the a value latency_type attribute.
const ( AttributeLatencyTypeKernel AttributeLatencyType AttributeLatencyTypeDevice )
func (AttributeLatencyType) String ¶
func (av AttributeLatencyType) String() string
String returns the string representation of the AttributeLatencyType.
type AttributeThroughputDirection ¶
type AttributeThroughputDirection int
AttributeThroughputDirection specifies the a value throughput_direction attribute.
const ( AttributeThroughputDirectionTransmitted AttributeThroughputDirection AttributeThroughputDirectionReceived )
func (AttributeThroughputDirection) String ¶
func (av AttributeThroughputDirection) String() string
String returns the string representation of the AttributeThroughputDirection.
type AttributeVMCountPowerState ¶
type AttributeVMCountPowerState int
AttributeVMCountPowerState specifies the a value vm_count_power_state attribute.
const ( AttributeVMCountPowerStateOn AttributeVMCountPowerState AttributeVMCountPowerStateOff )
func (AttributeVMCountPowerState) String ¶
func (av AttributeVMCountPowerState) String() string
String returns the string representation of the AttributeVMCountPowerState.
type MetricSettings ¶
type MetricSettings struct { Enabled bool `mapstructure:"enabled"` // contains filtered or unexported fields }
MetricSettings provides common settings for a particular metric.
func (*MetricSettings) IsEnabledProvidedByUser ¶ added in v0.63.0
func (ms *MetricSettings) IsEnabledProvidedByUser() bool
IsEnabledProvidedByUser returns true if `enabled` option is explicitly set in user settings to any value.
type MetricsBuilder ¶
type MetricsBuilder struct {
// contains filtered or unexported fields
}
MetricsBuilder provides an interface for scrapers to report metrics while taking care of all the transformations required to produce metric representation defined in metadata and user settings.
func NewMetricsBuilder ¶
func NewMetricsBuilder(settings MetricsSettings, buildInfo component.BuildInfo, options ...metricBuilderOption) *MetricsBuilder
func (*MetricsBuilder) Emit ¶
func (mb *MetricsBuilder) Emit(rmo ...ResourceMetricsOption) pmetric.Metrics
Emit returns all the metrics accumulated by the metrics builder and updates the internal state to be ready for recording another set of metrics. This function will be responsible for applying all the transformations required to produce metric representation defined in metadata and user settings, e.g. delta or cumulative.
func (*MetricsBuilder) EmitForResource ¶
func (mb *MetricsBuilder) EmitForResource(rmo ...ResourceMetricsOption)
EmitForResource saves all the generated metrics under a new resource and updates the internal state to be ready for recording another set of data points as part of another resource. This function can be helpful when one scraper needs to emit metrics from several resources. Otherwise calling this function is not required, just `Emit` function can be called instead. Resource attributes should be provided as ResourceMetricsOption arguments.
func (*MetricsBuilder) RecordVcenterClusterCPUEffectiveDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterClusterCPUEffectiveDataPoint(ts pcommon.Timestamp, val int64)
RecordVcenterClusterCPUEffectiveDataPoint adds a data point to vcenter.cluster.cpu.effective metric.
func (*MetricsBuilder) RecordVcenterClusterCPULimitDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterClusterCPULimitDataPoint(ts pcommon.Timestamp, val int64)
RecordVcenterClusterCPULimitDataPoint adds a data point to vcenter.cluster.cpu.limit metric.
func (*MetricsBuilder) RecordVcenterClusterHostCountDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterClusterHostCountDataPoint(ts pcommon.Timestamp, val int64, hostEffectiveAttributeValue bool)
RecordVcenterClusterHostCountDataPoint adds a data point to vcenter.cluster.host.count metric.
func (*MetricsBuilder) RecordVcenterClusterMemoryEffectiveDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterClusterMemoryEffectiveDataPoint(ts pcommon.Timestamp, val int64)
RecordVcenterClusterMemoryEffectiveDataPoint adds a data point to vcenter.cluster.memory.effective metric.
func (*MetricsBuilder) RecordVcenterClusterMemoryLimitDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterClusterMemoryLimitDataPoint(ts pcommon.Timestamp, val int64)
RecordVcenterClusterMemoryLimitDataPoint adds a data point to vcenter.cluster.memory.limit metric.
func (*MetricsBuilder) RecordVcenterClusterMemoryUsedDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterClusterMemoryUsedDataPoint(ts pcommon.Timestamp, val int64)
RecordVcenterClusterMemoryUsedDataPoint adds a data point to vcenter.cluster.memory.used metric.
func (*MetricsBuilder) RecordVcenterClusterVMCountDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterClusterVMCountDataPoint(ts pcommon.Timestamp, val int64, vmCountPowerStateAttributeValue AttributeVMCountPowerState)
RecordVcenterClusterVMCountDataPoint adds a data point to vcenter.cluster.vm.count metric.
func (*MetricsBuilder) RecordVcenterDatastoreDiskUsageDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterDatastoreDiskUsageDataPoint(ts pcommon.Timestamp, val int64, diskStateAttributeValue AttributeDiskState)
RecordVcenterDatastoreDiskUsageDataPoint adds a data point to vcenter.datastore.disk.usage metric.
func (*MetricsBuilder) RecordVcenterDatastoreDiskUtilizationDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterDatastoreDiskUtilizationDataPoint(ts pcommon.Timestamp, val float64)
RecordVcenterDatastoreDiskUtilizationDataPoint adds a data point to vcenter.datastore.disk.utilization metric.
func (*MetricsBuilder) RecordVcenterHostCPUUsageDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterHostCPUUsageDataPoint(ts pcommon.Timestamp, val int64)
RecordVcenterHostCPUUsageDataPoint adds a data point to vcenter.host.cpu.usage metric.
func (*MetricsBuilder) RecordVcenterHostCPUUtilizationDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterHostCPUUtilizationDataPoint(ts pcommon.Timestamp, val float64)
RecordVcenterHostCPUUtilizationDataPoint adds a data point to vcenter.host.cpu.utilization metric.
func (*MetricsBuilder) RecordVcenterHostDiskLatencyAvgDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterHostDiskLatencyAvgDataPoint(ts pcommon.Timestamp, val int64, diskDirectionAttributeValue AttributeDiskDirection)
RecordVcenterHostDiskLatencyAvgDataPoint adds a data point to vcenter.host.disk.latency.avg metric.
func (*MetricsBuilder) RecordVcenterHostDiskLatencyMaxDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterHostDiskLatencyMaxDataPoint(ts pcommon.Timestamp, val int64)
RecordVcenterHostDiskLatencyMaxDataPoint adds a data point to vcenter.host.disk.latency.max metric.
func (*MetricsBuilder) RecordVcenterHostDiskThroughputDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterHostDiskThroughputDataPoint(ts pcommon.Timestamp, val int64, diskDirectionAttributeValue AttributeDiskDirection)
RecordVcenterHostDiskThroughputDataPoint adds a data point to vcenter.host.disk.throughput metric.
func (*MetricsBuilder) RecordVcenterHostMemoryUsageDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterHostMemoryUsageDataPoint(ts pcommon.Timestamp, val int64)
RecordVcenterHostMemoryUsageDataPoint adds a data point to vcenter.host.memory.usage metric.
func (*MetricsBuilder) RecordVcenterHostMemoryUtilizationDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterHostMemoryUtilizationDataPoint(ts pcommon.Timestamp, val float64)
RecordVcenterHostMemoryUtilizationDataPoint adds a data point to vcenter.host.memory.utilization metric.
func (*MetricsBuilder) RecordVcenterHostNetworkPacketCountDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterHostNetworkPacketCountDataPoint(ts pcommon.Timestamp, val int64, throughputDirectionAttributeValue AttributeThroughputDirection)
RecordVcenterHostNetworkPacketCountDataPoint adds a data point to vcenter.host.network.packet.count metric.
func (*MetricsBuilder) RecordVcenterHostNetworkPacketErrorsDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterHostNetworkPacketErrorsDataPoint(ts pcommon.Timestamp, val int64, throughputDirectionAttributeValue AttributeThroughputDirection)
RecordVcenterHostNetworkPacketErrorsDataPoint adds a data point to vcenter.host.network.packet.errors metric.
func (*MetricsBuilder) RecordVcenterHostNetworkThroughputDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterHostNetworkThroughputDataPoint(ts pcommon.Timestamp, val int64, throughputDirectionAttributeValue AttributeThroughputDirection)
RecordVcenterHostNetworkThroughputDataPoint adds a data point to vcenter.host.network.throughput metric.
func (*MetricsBuilder) RecordVcenterHostNetworkUsageDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterHostNetworkUsageDataPoint(ts pcommon.Timestamp, val int64)
RecordVcenterHostNetworkUsageDataPoint adds a data point to vcenter.host.network.usage metric.
func (*MetricsBuilder) RecordVcenterResourcePoolCPUSharesDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterResourcePoolCPUSharesDataPoint(ts pcommon.Timestamp, val int64)
RecordVcenterResourcePoolCPUSharesDataPoint adds a data point to vcenter.resource_pool.cpu.shares metric.
func (*MetricsBuilder) RecordVcenterResourcePoolCPUUsageDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterResourcePoolCPUUsageDataPoint(ts pcommon.Timestamp, val int64)
RecordVcenterResourcePoolCPUUsageDataPoint adds a data point to vcenter.resource_pool.cpu.usage metric.
func (*MetricsBuilder) RecordVcenterResourcePoolMemorySharesDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterResourcePoolMemorySharesDataPoint(ts pcommon.Timestamp, val int64)
RecordVcenterResourcePoolMemorySharesDataPoint adds a data point to vcenter.resource_pool.memory.shares metric.
func (*MetricsBuilder) RecordVcenterResourcePoolMemoryUsageDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterResourcePoolMemoryUsageDataPoint(ts pcommon.Timestamp, val int64)
RecordVcenterResourcePoolMemoryUsageDataPoint adds a data point to vcenter.resource_pool.memory.usage metric.
func (*MetricsBuilder) RecordVcenterVMDiskLatencyAvgDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterVMDiskLatencyAvgDataPoint(ts pcommon.Timestamp, val int64, diskDirectionAttributeValue AttributeDiskDirection, diskTypeAttributeValue AttributeDiskType)
RecordVcenterVMDiskLatencyAvgDataPoint adds a data point to vcenter.vm.disk.latency.avg metric.
func (*MetricsBuilder) RecordVcenterVMDiskLatencyMaxDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterVMDiskLatencyMaxDataPoint(ts pcommon.Timestamp, val int64)
RecordVcenterVMDiskLatencyMaxDataPoint adds a data point to vcenter.vm.disk.latency.max metric.
func (*MetricsBuilder) RecordVcenterVMDiskThroughputDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterVMDiskThroughputDataPoint(ts pcommon.Timestamp, val int64)
RecordVcenterVMDiskThroughputDataPoint adds a data point to vcenter.vm.disk.throughput metric.
func (*MetricsBuilder) RecordVcenterVMDiskUsageDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterVMDiskUsageDataPoint(ts pcommon.Timestamp, val int64, diskStateAttributeValue AttributeDiskState)
RecordVcenterVMDiskUsageDataPoint adds a data point to vcenter.vm.disk.usage metric.
func (*MetricsBuilder) RecordVcenterVMDiskUtilizationDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterVMDiskUtilizationDataPoint(ts pcommon.Timestamp, val float64)
RecordVcenterVMDiskUtilizationDataPoint adds a data point to vcenter.vm.disk.utilization metric.
func (*MetricsBuilder) RecordVcenterVMMemoryBalloonedDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterVMMemoryBalloonedDataPoint(ts pcommon.Timestamp, val int64)
RecordVcenterVMMemoryBalloonedDataPoint adds a data point to vcenter.vm.memory.ballooned metric.
func (*MetricsBuilder) RecordVcenterVMMemoryUsageDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterVMMemoryUsageDataPoint(ts pcommon.Timestamp, val int64)
RecordVcenterVMMemoryUsageDataPoint adds a data point to vcenter.vm.memory.usage metric.
func (*MetricsBuilder) RecordVcenterVMNetworkPacketCountDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterVMNetworkPacketCountDataPoint(ts pcommon.Timestamp, val int64, throughputDirectionAttributeValue AttributeThroughputDirection)
RecordVcenterVMNetworkPacketCountDataPoint adds a data point to vcenter.vm.network.packet.count metric.
func (*MetricsBuilder) RecordVcenterVMNetworkThroughputDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterVMNetworkThroughputDataPoint(ts pcommon.Timestamp, val int64, throughputDirectionAttributeValue AttributeThroughputDirection)
RecordVcenterVMNetworkThroughputDataPoint adds a data point to vcenter.vm.network.throughput metric.
func (*MetricsBuilder) RecordVcenterVMNetworkUsageDataPoint ¶
func (mb *MetricsBuilder) RecordVcenterVMNetworkUsageDataPoint(ts pcommon.Timestamp, val int64)
RecordVcenterVMNetworkUsageDataPoint adds a data point to vcenter.vm.network.usage metric.
func (*MetricsBuilder) Reset ¶
func (mb *MetricsBuilder) Reset(options ...metricBuilderOption)
Reset resets metrics builder to its initial state. It should be used when external metrics source is restarted, and metrics builder should update its startTime and reset it's internal state accordingly.
type MetricsSettings ¶
type MetricsSettings struct { VcenterClusterCPUEffective MetricSettings `mapstructure:"vcenter.cluster.cpu.effective"` VcenterClusterCPULimit MetricSettings `mapstructure:"vcenter.cluster.cpu.limit"` VcenterClusterHostCount MetricSettings `mapstructure:"vcenter.cluster.host.count"` VcenterClusterMemoryEffective MetricSettings `mapstructure:"vcenter.cluster.memory.effective"` VcenterClusterMemoryLimit MetricSettings `mapstructure:"vcenter.cluster.memory.limit"` VcenterClusterMemoryUsed MetricSettings `mapstructure:"vcenter.cluster.memory.used"` VcenterClusterVMCount MetricSettings `mapstructure:"vcenter.cluster.vm.count"` VcenterDatastoreDiskUsage MetricSettings `mapstructure:"vcenter.datastore.disk.usage"` VcenterDatastoreDiskUtilization MetricSettings `mapstructure:"vcenter.datastore.disk.utilization"` VcenterHostCPUUsage MetricSettings `mapstructure:"vcenter.host.cpu.usage"` VcenterHostCPUUtilization MetricSettings `mapstructure:"vcenter.host.cpu.utilization"` VcenterHostDiskLatencyAvg MetricSettings `mapstructure:"vcenter.host.disk.latency.avg"` VcenterHostDiskLatencyMax MetricSettings `mapstructure:"vcenter.host.disk.latency.max"` VcenterHostDiskThroughput MetricSettings `mapstructure:"vcenter.host.disk.throughput"` VcenterHostMemoryUsage MetricSettings `mapstructure:"vcenter.host.memory.usage"` VcenterHostMemoryUtilization MetricSettings `mapstructure:"vcenter.host.memory.utilization"` VcenterHostNetworkPacketCount MetricSettings `mapstructure:"vcenter.host.network.packet.count"` VcenterHostNetworkPacketErrors MetricSettings `mapstructure:"vcenter.host.network.packet.errors"` VcenterHostNetworkThroughput MetricSettings `mapstructure:"vcenter.host.network.throughput"` VcenterHostNetworkUsage MetricSettings `mapstructure:"vcenter.host.network.usage"` VcenterResourcePoolCPUUsage MetricSettings `mapstructure:"vcenter.resource_pool.cpu.usage"` VcenterResourcePoolMemoryUsage MetricSettings `mapstructure:"vcenter.resource_pool.memory.usage"` VcenterVMDiskLatencyAvg MetricSettings `mapstructure:"vcenter.vm.disk.latency.avg"` VcenterVMDiskLatencyMax MetricSettings `mapstructure:"vcenter.vm.disk.latency.max"` VcenterVMDiskThroughput MetricSettings `mapstructure:"vcenter.vm.disk.throughput"` VcenterVMDiskUsage MetricSettings `mapstructure:"vcenter.vm.disk.usage"` VcenterVMDiskUtilization MetricSettings `mapstructure:"vcenter.vm.disk.utilization"` VcenterVMMemoryBallooned MetricSettings `mapstructure:"vcenter.vm.memory.ballooned"` VcenterVMMemoryUsage MetricSettings `mapstructure:"vcenter.vm.memory.usage"` VcenterVMNetworkPacketCount MetricSettings `mapstructure:"vcenter.vm.network.packet.count"` VcenterVMNetworkThroughput MetricSettings `mapstructure:"vcenter.vm.network.throughput"` VcenterVMNetworkUsage MetricSettings `mapstructure:"vcenter.vm.network.usage"` }
MetricsSettings provides settings for vcenterreceiver metrics.
func DefaultMetricsSettings ¶
func DefaultMetricsSettings() MetricsSettings
type ResourceMetricsOption ¶
type ResourceMetricsOption func(pmetric.ResourceMetrics)
ResourceMetricsOption applies changes to provided resource metrics.
func WithStartTimeOverride ¶
func WithStartTimeOverride(start pcommon.Timestamp) ResourceMetricsOption
WithStartTimeOverride overrides start time for all the resource metrics data points. This option should be only used if different start time has to be set on metrics coming from different resources.
func WithVcenterClusterName ¶
func WithVcenterClusterName(val string) ResourceMetricsOption
WithVcenterClusterName sets provided value as "vcenter.cluster.name" attribute for current resource.
func WithVcenterDatastoreName ¶
func WithVcenterDatastoreName(val string) ResourceMetricsOption
WithVcenterDatastoreName sets provided value as "vcenter.datastore.name" attribute for current resource.
func WithVcenterHostName ¶
func WithVcenterHostName(val string) ResourceMetricsOption
WithVcenterHostName sets provided value as "vcenter.host.name" attribute for current resource.
func WithVcenterResourcePoolName ¶
func WithVcenterResourcePoolName(val string) ResourceMetricsOption
WithVcenterResourcePoolName sets provided value as "vcenter.resource_pool.name" attribute for current resource.
func WithVcenterVMID ¶
func WithVcenterVMID(val string) ResourceMetricsOption
WithVcenterVMID sets provided value as "vcenter.vm.id" attribute for current resource.
func WithVcenterVMName ¶
func WithVcenterVMName(val string) ResourceMetricsOption
WithVcenterVMName sets provided value as "vcenter.vm.name" attribute for current resource.