Align metric names with Prometheus naming conventions
Use base units, export cumulative values as _total counters, update docs, dashboards and rules.
This commit is contained in:
@@ -15,9 +15,9 @@ type PveNodeZfsCollector struct {
|
||||
registry *TTLRegistry
|
||||
|
||||
state *TTLGaugeVec
|
||||
readErrors *TTLGaugeVec
|
||||
writeErrors *TTLGaugeVec
|
||||
checksumErrors *TTLGaugeVec
|
||||
readErrors *TTLCounterVec
|
||||
writeErrors *TTLCounterVec
|
||||
checksumErrors *TTLCounterVec
|
||||
}
|
||||
|
||||
// zfsMetricComponent is a flattened entry from the recursive ZFS topology.
|
||||
@@ -50,9 +50,9 @@ func NewPveNodeZfsCollector(apiClient *proxmox.PveApiClient, registry *TTLRegist
|
||||
)
|
||||
c.registry.Register(c.state)
|
||||
|
||||
c.readErrors = NewTTLGaugeVec(
|
||||
prometheus.GaugeOpts{
|
||||
Name: "pve_node_zfs_read_errors",
|
||||
c.readErrors = NewTTLCounterVec(
|
||||
prometheus.CounterOpts{
|
||||
Name: "pve_node_zfs_read_errors_total",
|
||||
Help: "ZFS pool component read error count.",
|
||||
},
|
||||
componentLabelNames,
|
||||
@@ -60,9 +60,9 @@ func NewPveNodeZfsCollector(apiClient *proxmox.PveApiClient, registry *TTLRegist
|
||||
)
|
||||
c.registry.Register(c.readErrors)
|
||||
|
||||
c.writeErrors = NewTTLGaugeVec(
|
||||
prometheus.GaugeOpts{
|
||||
Name: "pve_node_zfs_write_errors",
|
||||
c.writeErrors = NewTTLCounterVec(
|
||||
prometheus.CounterOpts{
|
||||
Name: "pve_node_zfs_write_errors_total",
|
||||
Help: "ZFS pool component write error count.",
|
||||
},
|
||||
componentLabelNames,
|
||||
@@ -70,9 +70,9 @@ func NewPveNodeZfsCollector(apiClient *proxmox.PveApiClient, registry *TTLRegist
|
||||
)
|
||||
c.registry.Register(c.writeErrors)
|
||||
|
||||
c.checksumErrors = NewTTLGaugeVec(
|
||||
prometheus.GaugeOpts{
|
||||
Name: "pve_node_zfs_checksum_errors",
|
||||
c.checksumErrors = NewTTLCounterVec(
|
||||
prometheus.CounterOpts{
|
||||
Name: "pve_node_zfs_checksum_errors_total",
|
||||
Help: "ZFS pool component checksum error count.",
|
||||
},
|
||||
componentLabelNames,
|
||||
|
||||
Reference in New Issue
Block a user