Documentation ¶
Index ¶
- type Metrics
- func (m *Metrics) Collectors() []prometheus.Collector
- func (m *Metrics) ErrorCollectors() []prometheus.Collector
- func (m *Metrics) IncErrorRequestCounter()
- func (m *Metrics) IncRejectRequestCounter()
- func (m *Metrics) SetBlockDeviceCapacity(capacity uint64) *Metrics
- func (m *Metrics) SetBlockDeviceCurrentTemperature(currentTemp int16) *Metrics
- func (m *Metrics) SetBlockDeviceCurrentTemperatureValid(valid bool) *Metrics
- func (m *Metrics) SetBlockDeviceHighestTemperature(highTemp int16) *Metrics
- func (m *Metrics) SetBlockDeviceHighestTemperatureValid(valid bool) *Metrics
- func (m *Metrics) SetBlockDeviceLowestTemperature(lowTemp int16) *Metrics
- func (m *Metrics) SetBlockDeviceLowestTemperatureValid(valid bool) *Metrics
- func (m *Metrics) SetBlockDevicePercentEnduranceUsed(size float64) *Metrics
- func (m *Metrics) SetBlockDeviceTotalBytesRead(size uint64) *Metrics
- func (m *Metrics) SetBlockDeviceTotalBytesWritten(size uint64) *Metrics
- func (m *Metrics) SetBlockDeviceUtilizationRate(size float64) *Metrics
- func (m *Metrics) WithBlockDeviceCapacity() *Metrics
- func (m *Metrics) WithBlockDeviceCurrentTemperature() *Metrics
- func (m *Metrics) WithBlockDeviceCurrentTemperatureValid() *Metrics
- func (m *Metrics) WithBlockDeviceHighestTemperature() *Metrics
- func (m *Metrics) WithBlockDeviceHighestTemperatureValid() *Metrics
- func (m *Metrics) WithBlockDeviceLowestTemperature() *Metrics
- func (m *Metrics) WithBlockDeviceLowestTemperatureValid() *Metrics
- func (m *Metrics) WithBlockDevicePercentEnduranceUsed() *Metrics
- func (m *Metrics) WithBlockDeviceTotalBytesRead() *Metrics
- func (m *Metrics) WithBlockDeviceTotalBytesWritten() *Metrics
- func (m *Metrics) WithBlockDeviceUtilizationRate() *Metrics
- func (m *Metrics) WithErrorRequest() *Metrics
- func (m *Metrics) WithRejectRequest() *Metrics
- type MetricsData
- type MetricsLabels
- func (ml *MetricsLabels) WithBlockDeviceHostName(hostName string) *MetricsLabels
- func (ml *MetricsLabels) WithBlockDeviceNodeName(nodeName string) *MetricsLabels
- func (ml *MetricsLabels) WithBlockDevicePath(path string) *MetricsLabels
- func (ml *MetricsLabels) WithBlockDeviceUUID(uuid string) *MetricsLabels
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 ¶
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) SetBlockDeviceCapacity ¶ added in v0.9.0
SetBlockDeviceCapacity sets the current block device capacity value to the metric
func (*Metrics) SetBlockDeviceCurrentTemperature ¶
SetBlockDeviceCurrentTemperature sets the current temperature value to the metric
func (*Metrics) SetBlockDeviceCurrentTemperatureValid ¶
SetBlockDeviceCurrentTemperatureValid sets the validity of the exposed current temperature metrics
func (*Metrics) SetBlockDeviceHighestTemperature ¶ added in v0.9.0
SetBlockDeviceHighestTemperature sets the highest temperature value to the metric
func (*Metrics) SetBlockDeviceHighestTemperatureValid ¶ added in v0.9.0
SetBlockDeviceHighestTemperatureValid sets the validity of the exposed highest temperature metrics
func (*Metrics) SetBlockDeviceLowestTemperature ¶ added in v0.9.0
SetBlockDeviceLowestTemperature sets the lowest temperature value to the metric
func (*Metrics) SetBlockDeviceLowestTemperatureValid ¶ added in v0.9.0
SetBlockDeviceLowestTemperatureValid sets the validity of the exposed lowest temperature metrics
func (*Metrics) SetBlockDevicePercentEnduranceUsed ¶ added in v0.9.0
SetBlockDevicePercentEnduranceUsed sets the percentage of endurance used by a block device to the metric
func (*Metrics) SetBlockDeviceTotalBytesRead ¶ added in v0.9.0
SetBlockDeviceTotalBytesRead sets the total bytes read value to the metric
func (*Metrics) SetBlockDeviceTotalBytesWritten ¶ added in v0.9.0
SetBlockDeviceTotalBytesWritten sets the total bytes written value to the metric
func (*Metrics) SetBlockDeviceUtilizationRate ¶ added in v0.9.0
SetBlockDeviceUtilizationRate sets the utilization rate value to the metric
func (*Metrics) WithBlockDeviceCapacity ¶ added in v0.9.0
WithBlockDeviceCapacity declares the blockdevice capacity
func (*Metrics) WithBlockDeviceCurrentTemperature ¶
WithBlockDeviceCurrentTemperature declares the metric current temperature as a prometheus metric
func (*Metrics) WithBlockDeviceCurrentTemperatureValid ¶
WithBlockDeviceCurrentTemperatureValid declares the metric current temperature valid as a prometheus metric
func (*Metrics) WithBlockDeviceHighestTemperature ¶ added in v0.9.0
WithBlockDeviceHighestTemperature declares the metric highest temperature as a prometheus metric
func (*Metrics) WithBlockDeviceHighestTemperatureValid ¶ added in v0.9.0
WithBlockDeviceHighestTemperatureValid declares the metric highest temperature valid as a prometheus metric
func (*Metrics) WithBlockDeviceLowestTemperature ¶ added in v0.9.0
WithBlockDeviceLowestTemperature declares the metric lowest temperature as a prometheus metric
func (*Metrics) WithBlockDeviceLowestTemperatureValid ¶ added in v0.9.0
WithBlockDeviceLowestTemperatureValid declares the metric lowest temperature valid as a prometheus metric
func (*Metrics) WithBlockDevicePercentEnduranceUsed ¶ added in v0.9.0
WithBlockDevicePercentEnduranceUsed declares the percentage of endurance used by a block device
func (*Metrics) WithBlockDeviceTotalBytesRead ¶ added in v0.9.0
WithBlockDeviceTotalBytesRead declares the total number of bytes read by a block device
func (*Metrics) WithBlockDeviceTotalBytesWritten ¶ added in v0.9.0
WithBlockDeviceTotalBytesWritten declares the total number of bytes written by a block device
func (*Metrics) WithBlockDeviceUtilizationRate ¶ added in v0.9.0
WithBlockDeviceUtilizationRate declares the utilization rate of a block device
func (*Metrics) WithErrorRequest ¶
WithErrorRequest declares the error request count metric
func (*Metrics) WithRejectRequest ¶
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 ¶
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