smart

package
v0.7.0-RC2 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2020 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	CollectorType string
	MetricsData
	MetricsLabels
}

Metrics defines the metrics data along with the labels present on those metrics. The collector(currently seachest/smart) used to fetch the metrics is also defined

func NewMetrics

func NewMetrics(collector string) *Metrics

NewMetrics creates a new Metrics with the given collector type

func (*Metrics) Collectors

func (m *Metrics) Collectors() []prometheus.Collector

Collectors lists out all the collectors for which the metrics is exposed

func (*Metrics) ErrorCollectors

func (m *Metrics) ErrorCollectors() []prometheus.Collector

ErrorCollectors lists out all collectors for metrics related to error

func (*Metrics) IncErrorRequestCounter

func (m *Metrics) IncErrorRequestCounter()

IncErrorRequestCounter increments the no of requests errored out.

func (*Metrics) IncRejectRequestCounter

func (m *Metrics) IncRejectRequestCounter()

IncRejectRequestCounter increments the reject request error counter

func (*Metrics) SetBlockDeviceCurrentTemperature

func (m *Metrics) SetBlockDeviceCurrentTemperature(currentTemp int16) *Metrics

SetBlockDeviceCurrentTemperature sets the current temperature value to the metric

func (*Metrics) SetBlockDeviceCurrentTemperatureValid

func (m *Metrics) SetBlockDeviceCurrentTemperatureValid(valid bool) *Metrics

SetBlockDeviceCurrentTemperatureValid sets the validity of the exposed current temperature metrics

func (*Metrics) WithBlockDeviceCurrentTemperature

func (m *Metrics) WithBlockDeviceCurrentTemperature() *Metrics

WithBlockDeviceCurrentTemperature declares the metric current temperature as a prometheus metric

func (*Metrics) WithBlockDeviceCurrentTemperatureValid

func (m *Metrics) WithBlockDeviceCurrentTemperatureValid() *Metrics

WithBlockDeviceCurrentTemperatureValid declares the metric current temperature valid as a prometheus metric

func (*Metrics) WithErrorRequest

func (m *Metrics) WithErrorRequest() *Metrics

WithErrorRequest declares the error request count metric

func (*Metrics) WithRejectRequest

func (m *Metrics) WithRejectRequest() *Metrics

WithRejectRequest declares the reject request count metric

type MetricsData

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

MetricsData is the prometheus metrics that are exposed by the exporter. This includes all the metrics that are available via SMART TODO additional smart metrics need to be added here

type MetricsLabels

type MetricsLabels struct {
	UUID     string
	Path     string
	HostName string
	NodeName string
}

MetricsLabels are the labels that are available on the prometheus metrics

func (*MetricsLabels) WithBlockDeviceHostName

func (ml *MetricsLabels) WithBlockDeviceHostName(hostName string) *MetricsLabels

WithBlockDeviceHostName sets the blockdevice hostname to the metric label

func (*MetricsLabels) WithBlockDeviceNodeName

func (ml *MetricsLabels) WithBlockDeviceNodeName(nodeName string) *MetricsLabels

WithBlockDeviceNodeName sets the blockdevice nodename to the metric label

func (*MetricsLabels) WithBlockDevicePath

func (ml *MetricsLabels) WithBlockDevicePath(path string) *MetricsLabels

WithBlockDevicePath sets the blockdevice path to the metric label

func (*MetricsLabels) WithBlockDeviceUUID

func (ml *MetricsLabels) WithBlockDeviceUUID(uuid string) *MetricsLabels

WithBlockDeviceUUID sets the blockdevice UUID to the metric label

Jump to

Keyboard shortcuts

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