mirror of
https://github.com/minio/minio.git
synced 2024-12-25 06:35:56 -05:00
Add minio_bucket_usage_version_total metric to Prometheus (#17023)
This commit is contained in:
parent
bdad3730f7
commit
a42650c065
@ -155,6 +155,7 @@ const (
|
|||||||
waitingTotal MetricName = "waiting_total"
|
waitingTotal MetricName = "waiting_total"
|
||||||
incomingTotal MetricName = "incoming_total"
|
incomingTotal MetricName = "incoming_total"
|
||||||
objectTotal MetricName = "object_total"
|
objectTotal MetricName = "object_total"
|
||||||
|
versionTotal MetricName = "version_total"
|
||||||
offlineTotal MetricName = "offline_total"
|
offlineTotal MetricName = "offline_total"
|
||||||
onlineTotal MetricName = "online_total"
|
onlineTotal MetricName = "online_total"
|
||||||
openTotal MetricName = "open_total"
|
openTotal MetricName = "open_total"
|
||||||
@ -509,6 +510,16 @@ func getBucketUsageObjectsTotalMD() MetricDescription {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func getBucketUsageVersionsTotalMD() MetricDescription {
|
||||||
|
return MetricDescription{
|
||||||
|
Namespace: bucketMetricNamespace,
|
||||||
|
Subsystem: usageSubsystem,
|
||||||
|
Name: versionTotal,
|
||||||
|
Help: "Total number of versions",
|
||||||
|
Type: gaugeMetric,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func getBucketRepLatencyMD() MetricDescription {
|
func getBucketRepLatencyMD() MetricDescription {
|
||||||
return MetricDescription{
|
return MetricDescription{
|
||||||
Namespace: bucketMetricNamespace,
|
Namespace: bucketMetricNamespace,
|
||||||
@ -1995,6 +2006,12 @@ func getBucketUsageMetrics() *MetricsGroup {
|
|||||||
VariableLabels: map[string]string{"bucket": bucket},
|
VariableLabels: map[string]string{"bucket": bucket},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
metrics = append(metrics, Metric{
|
||||||
|
Description: getBucketUsageVersionsTotalMD(),
|
||||||
|
Value: float64(usage.VersionsCount),
|
||||||
|
VariableLabels: map[string]string{"bucket": bucket},
|
||||||
|
})
|
||||||
|
|
||||||
metrics = append(metrics, Metric{
|
metrics = append(metrics, Metric{
|
||||||
Description: getBucketRepReceivedBytesMD(),
|
Description: getBucketRepReceivedBytesMD(),
|
||||||
Value: float64(stats.ReplicaSize),
|
Value: float64(stats.ReplicaSize),
|
||||||
|
Loading…
Reference in New Issue
Block a user