mirror of
https://github.com/minio/minio.git
synced 2025-07-10 01:22:16 -04:00
Add deletemarker_total metric (#17689)
This commit is contained in:
parent
756d6aa729
commit
9eeee92d36
@ -175,6 +175,7 @@ const (
|
|||||||
incomingTotal MetricName = "incoming_total"
|
incomingTotal MetricName = "incoming_total"
|
||||||
objectTotal MetricName = "object_total"
|
objectTotal MetricName = "object_total"
|
||||||
versionTotal MetricName = "version_total"
|
versionTotal MetricName = "version_total"
|
||||||
|
deleteMarkerTotal MetricName = "deletemarker_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"
|
||||||
@ -584,6 +585,16 @@ func getClusterUsageVersionsTotalMD() MetricDescription {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func getClusterUsageDeleteMarkersTotalMD() MetricDescription {
|
||||||
|
return MetricDescription{
|
||||||
|
Namespace: clusterMetricNamespace,
|
||||||
|
Subsystem: usageSubsystem,
|
||||||
|
Name: deleteMarkerTotal,
|
||||||
|
Help: "Total number of delete markers in a cluster",
|
||||||
|
Type: gaugeMetric,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func getBucketUsageObjectsTotalMD() MetricDescription {
|
func getBucketUsageObjectsTotalMD() MetricDescription {
|
||||||
return MetricDescription{
|
return MetricDescription{
|
||||||
Namespace: bucketMetricNamespace,
|
Namespace: bucketMetricNamespace,
|
||||||
@ -604,6 +615,16 @@ func getBucketUsageVersionsTotalMD() MetricDescription {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func getBucketUsageDeleteMarkersTotalMD() MetricDescription {
|
||||||
|
return MetricDescription{
|
||||||
|
Namespace: bucketMetricNamespace,
|
||||||
|
Subsystem: usageSubsystem,
|
||||||
|
Name: deleteMarkerTotal,
|
||||||
|
Help: "Total number of delete markers",
|
||||||
|
Type: gaugeMetric,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func getBucketRepLatencyMD() MetricDescription {
|
func getBucketRepLatencyMD() MetricDescription {
|
||||||
return MetricDescription{
|
return MetricDescription{
|
||||||
Namespace: bucketMetricNamespace,
|
Namespace: bucketMetricNamespace,
|
||||||
@ -2267,6 +2288,7 @@ func getClusterUsageMetrics() *MetricsGroup {
|
|||||||
clusterBuckets uint64
|
clusterBuckets uint64
|
||||||
clusterObjectsCount uint64
|
clusterObjectsCount uint64
|
||||||
clusterVersionsCount uint64
|
clusterVersionsCount uint64
|
||||||
|
clusterDeleteMarkersCount uint64
|
||||||
)
|
)
|
||||||
|
|
||||||
clusterObjectSizesHistogram := map[string]uint64{}
|
clusterObjectSizesHistogram := map[string]uint64{}
|
||||||
@ -2276,6 +2298,7 @@ func getClusterUsageMetrics() *MetricsGroup {
|
|||||||
clusterSize += usage.Size
|
clusterSize += usage.Size
|
||||||
clusterObjectsCount += usage.ObjectsCount
|
clusterObjectsCount += usage.ObjectsCount
|
||||||
clusterVersionsCount += usage.VersionsCount
|
clusterVersionsCount += usage.VersionsCount
|
||||||
|
clusterDeleteMarkersCount += usage.DeleteMarkersCount
|
||||||
for k, v := range usage.ObjectSizesHistogram {
|
for k, v := range usage.ObjectSizesHistogram {
|
||||||
v1, ok := clusterObjectSizesHistogram[k]
|
v1, ok := clusterObjectSizesHistogram[k]
|
||||||
if !ok {
|
if !ok {
|
||||||
@ -2311,6 +2334,11 @@ func getClusterUsageMetrics() *MetricsGroup {
|
|||||||
Value: float64(clusterVersionsCount),
|
Value: float64(clusterVersionsCount),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
metrics = append(metrics, Metric{
|
||||||
|
Description: getClusterUsageDeleteMarkersTotalMD(),
|
||||||
|
Value: float64(clusterDeleteMarkersCount),
|
||||||
|
})
|
||||||
|
|
||||||
metrics = append(metrics, Metric{
|
metrics = append(metrics, Metric{
|
||||||
Description: getClusterObjectDistributionMD(),
|
Description: getClusterObjectDistributionMD(),
|
||||||
Histogram: clusterObjectSizesHistogram,
|
Histogram: clusterObjectSizesHistogram,
|
||||||
@ -2385,6 +2413,12 @@ func getBucketUsageMetrics() *MetricsGroup {
|
|||||||
VariableLabels: map[string]string{"bucket": bucket},
|
VariableLabels: map[string]string{"bucket": bucket},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
metrics = append(metrics, Metric{
|
||||||
|
Description: getBucketUsageDeleteMarkersTotalMD(),
|
||||||
|
Value: float64(usage.DeleteMarkersCount),
|
||||||
|
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),
|
||||||
|
@ -24,6 +24,7 @@ These metrics can be obtained from any MinIO server once per collection.
|
|||||||
| `minio_cluster_usage_object_total` | Total number of objects in a cluster |
|
| `minio_cluster_usage_object_total` | Total number of objects in a cluster |
|
||||||
| `minio_cluster_usage_total_bytes` | Total cluster usage in bytes |
|
| `minio_cluster_usage_total_bytes` | Total cluster usage in bytes |
|
||||||
| `minio_cluster_usage_version_total` | Total number of versions (includes delete marker) in a cluster |
|
| `minio_cluster_usage_version_total` | Total number of versions (includes delete marker) in a cluster |
|
||||||
|
| `minio_cluster_usage_deletemarker_total` | Total number of delete markers in a cluster |
|
||||||
| `minio_cluster_usage_total_bytes` | Total cluster usage in bytes |
|
| `minio_cluster_usage_total_bytes` | Total cluster usage in bytes |
|
||||||
| `minio_cluster_buckets_total` | Total number of buckets in the cluster |
|
| `minio_cluster_buckets_total` | Total number of buckets in the cluster |
|
||||||
| `minio_cluster_disk_offline_total` | Total drives offline. |
|
| `minio_cluster_disk_offline_total` | Total drives offline. |
|
||||||
@ -125,6 +126,7 @@ These metrics can be obtained from any MinIO server once per collection.
|
|||||||
| `minio_bucket_traffic_sent_bytes` | Total number of S3 bytes sent for this bucket. |
|
| `minio_bucket_traffic_sent_bytes` | Total number of S3 bytes sent for this bucket. |
|
||||||
| `minio_bucket_usage_object_total` | Total number of objects. |
|
| `minio_bucket_usage_object_total` | Total number of objects. |
|
||||||
| `minio_bucket_usage_version_total` | Total number of versions (includes delete marker) |
|
| `minio_bucket_usage_version_total` | Total number of versions (includes delete marker) |
|
||||||
|
| `minio_bucket_usage_deletemarker_total` | Total number of delete markers. |
|
||||||
| `minio_bucket_usage_total_bytes` | Total bucket size in bytes. |
|
| `minio_bucket_usage_total_bytes` | Total bucket size in bytes. |
|
||||||
| `minio_bucket_requests_4xx_errors_total` | Total number of S3 requests with (4xx) errors on a bucket. |
|
| `minio_bucket_requests_4xx_errors_total` | Total number of S3 requests with (4xx) errors on a bucket. |
|
||||||
| `minio_bucket_requests_5xx_errors_total` | Total number of S3 requests with (5xx) errors on a bucket. |
|
| `minio_bucket_requests_5xx_errors_total` | Total number of S3 requests with (5xx) errors on a bucket. |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user