mirror of
https://github.com/minio/minio.git
synced 2025-11-09 05:34:56 -05:00
Add free inode metric for Prometheus (#12225)
This commit is contained in:
committed by
Harshavardhana
parent
2fd9c13b50
commit
776589f0da
@@ -93,6 +93,7 @@ const (
|
||||
timestampTotal MetricName = "timestamp_total"
|
||||
writeTotal MetricName = "write_total"
|
||||
total MetricName = "total"
|
||||
freeInodes MetricName = "free_inodes"
|
||||
|
||||
failedCount MetricName = "failed_count"
|
||||
failedBytes MetricName = "failed_bytes"
|
||||
@@ -352,6 +353,16 @@ func getClusterDisksTotalMD() MetricDescription {
|
||||
}
|
||||
}
|
||||
|
||||
func getClusterDisksFreeInodes() MetricDescription {
|
||||
return MetricDescription{
|
||||
Namespace: clusterMetricNamespace,
|
||||
Subsystem: diskSubsystem,
|
||||
Name: freeInodes,
|
||||
Help: "Total free inodes.",
|
||||
Type: gaugeMetric,
|
||||
}
|
||||
}
|
||||
|
||||
func getNodeDiskTotalBytesMD() MetricDescription {
|
||||
return MetricDescription{
|
||||
Namespace: nodeMetricNamespace,
|
||||
@@ -1386,6 +1397,12 @@ func getLocalStorageMetrics() MetricsGroup {
|
||||
Value: float64(disk.TotalSpace),
|
||||
VariableLabels: map[string]string{"disk": disk.DrivePath},
|
||||
})
|
||||
|
||||
metrics = append(metrics, Metric{
|
||||
Description: getClusterDisksFreeInodes(),
|
||||
Value: float64(disk.FreeInodes),
|
||||
VariableLabels: map[string]string{"disk": disk.DrivePath},
|
||||
})
|
||||
}
|
||||
return
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user