mirror of
https://github.com/minio/minio.git
synced 2026-06-04 10:13:48 +08:00
add metrics ioerror counter for alerts on I/O errors (#19618)
This commit is contained in:
@@ -541,6 +541,16 @@ func getNodeDriveTimeoutErrorsMD() MetricDescription {
|
||||
}
|
||||
}
|
||||
|
||||
func getNodeDriveIOErrorsMD() MetricDescription {
|
||||
return MetricDescription{
|
||||
Namespace: nodeMetricNamespace,
|
||||
Subsystem: driveSubsystem,
|
||||
Name: "errors_ioerror",
|
||||
Help: "Total number of drive I/O errors since server start",
|
||||
Type: counterMetric,
|
||||
}
|
||||
}
|
||||
|
||||
func getNodeDriveAvailabilityErrorsMD() MetricDescription {
|
||||
return MetricDescription{
|
||||
Namespace: nodeMetricNamespace,
|
||||
@@ -3521,6 +3531,12 @@ func getLocalStorageMetrics(opts MetricsGroupOpts) *MetricsGroupV2 {
|
||||
VariableLabels: map[string]string{"drive": disk.DrivePath},
|
||||
})
|
||||
|
||||
metrics = append(metrics, MetricV2{
|
||||
Description: getNodeDriveIOErrorsMD(),
|
||||
Value: float64(disk.Metrics.TotalErrorsAvailability - disk.Metrics.TotalErrorsTimeout),
|
||||
VariableLabels: map[string]string{"drive": disk.DrivePath},
|
||||
})
|
||||
|
||||
metrics = append(metrics, MetricV2{
|
||||
Description: getNodeDriveAvailabilityErrorsMD(),
|
||||
Value: float64(disk.Metrics.TotalErrorsAvailability),
|
||||
|
||||
Reference in New Issue
Block a user