mirror of
https://github.com/minio/minio.git
synced 2025-04-01 10:13:42 -04:00
Add deletemarker_total metric (#17689)
This commit is contained in:
parent
756d6aa729
commit
9eeee92d36
@ -161,28 +161,29 @@ const (
|
|||||||
type MetricName string
|
type MetricName string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
authTotal MetricName = "auth_total"
|
authTotal MetricName = "auth_total"
|
||||||
canceledTotal MetricName = "canceled_total"
|
canceledTotal MetricName = "canceled_total"
|
||||||
errorsTotal MetricName = "errors_total"
|
errorsTotal MetricName = "errors_total"
|
||||||
headerTotal MetricName = "header_total"
|
headerTotal MetricName = "header_total"
|
||||||
healTotal MetricName = "heal_total"
|
healTotal MetricName = "heal_total"
|
||||||
hitsTotal MetricName = "hits_total"
|
hitsTotal MetricName = "hits_total"
|
||||||
inflightTotal MetricName = "inflight_total"
|
inflightTotal MetricName = "inflight_total"
|
||||||
invalidTotal MetricName = "invalid_total"
|
invalidTotal MetricName = "invalid_total"
|
||||||
limitTotal MetricName = "limit_total"
|
limitTotal MetricName = "limit_total"
|
||||||
missedTotal MetricName = "missed_total"
|
missedTotal MetricName = "missed_total"
|
||||||
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"
|
versionTotal MetricName = "version_total"
|
||||||
offlineTotal MetricName = "offline_total"
|
deleteMarkerTotal MetricName = "deletemarker_total"
|
||||||
onlineTotal MetricName = "online_total"
|
offlineTotal MetricName = "offline_total"
|
||||||
openTotal MetricName = "open_total"
|
onlineTotal MetricName = "online_total"
|
||||||
readTotal MetricName = "read_total"
|
openTotal MetricName = "open_total"
|
||||||
timestampTotal MetricName = "timestamp_total"
|
readTotal MetricName = "read_total"
|
||||||
writeTotal MetricName = "write_total"
|
timestampTotal MetricName = "timestamp_total"
|
||||||
total MetricName = "total"
|
writeTotal MetricName = "write_total"
|
||||||
freeInodes MetricName = "free_inodes"
|
total MetricName = "total"
|
||||||
|
freeInodes MetricName = "free_inodes"
|
||||||
|
|
||||||
failedCount MetricName = "failed_count"
|
failedCount MetricName = "failed_count"
|
||||||
failedBytes MetricName = "failed_bytes"
|
failedBytes MetricName = "failed_bytes"
|
||||||
@ -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,
|
||||||
@ -2263,10 +2284,11 @@ func getClusterUsageMetrics() *MetricsGroup {
|
|||||||
})
|
})
|
||||||
|
|
||||||
var (
|
var (
|
||||||
clusterSize uint64
|
clusterSize uint64
|
||||||
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