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) SetBlockDeviceCurrentTemperature(currentTemp int16) *Metrics
- func (m *Metrics) SetBlockDeviceCurrentTemperatureValid(valid bool) *Metrics
- func (m *Metrics) WithBlockDeviceCurrentTemperature() *Metrics
- func (m *Metrics) WithBlockDeviceCurrentTemperatureValid() *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) 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) 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) 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