mirror of https://github.com/minio/minio.git
Move /cluster/audit to /audit (#19708)
As the audit metrics are server level and not overall cluster level.
This commit is contained in:
parent
9667a170de
commit
60d7e8143a
|
@ -42,9 +42,9 @@ var (
|
|||
targetID)
|
||||
)
|
||||
|
||||
// loadClusterAuditMetrics - `MetricsLoaderFn` for cluster audit
|
||||
// loadAuditMetrics - `MetricsLoaderFn` for audit
|
||||
// such as failed messages and total messages.
|
||||
func loadClusterAuditMetrics(_ context.Context, m MetricValues, c *metricsCache) error {
|
||||
func loadAuditMetrics(_ context.Context, m MetricValues, c *metricsCache) error {
|
||||
audit := logger.CurrentStats()
|
||||
for id, st := range audit {
|
||||
labels := []string{targetID, id}
|
|
@ -48,9 +48,10 @@ const (
|
|||
clusterUsageObjectsCollectorPath collectorPath = "/cluster/usage/objects"
|
||||
clusterUsageBucketsCollectorPath collectorPath = "/cluster/usage/buckets"
|
||||
clusterErasureSetCollectorPath collectorPath = "/cluster/erasure-set"
|
||||
clusterAuditCollectorPath collectorPath = "/cluster/audit"
|
||||
clusterNotificationCollectorPath collectorPath = "/cluster/notification"
|
||||
clusterIAMCollectorPath collectorPath = "/cluster/iam"
|
||||
|
||||
auditCollectorPath collectorPath = "/audit"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -264,15 +265,6 @@ func newMetricGroups(r *prometheus.Registry) *metricsV3Collection {
|
|||
loadClusterErasureSetMetrics,
|
||||
)
|
||||
|
||||
clusterAuditMG := NewMetricsGroup(clusterAuditCollectorPath,
|
||||
[]MetricDescriptor{
|
||||
auditFailedMessagesMD,
|
||||
auditTargetQueueLengthMD,
|
||||
auditTotalMessagesMD,
|
||||
},
|
||||
loadClusterAuditMetrics,
|
||||
)
|
||||
|
||||
clusterNotificationMG := NewMetricsGroup(clusterNotificationCollectorPath,
|
||||
[]MetricDescriptor{
|
||||
notificationCurrentSendInProgressMD,
|
||||
|
@ -299,6 +291,15 @@ func newMetricGroups(r *prometheus.Registry) *metricsV3Collection {
|
|||
loadClusterIAMMetrics,
|
||||
)
|
||||
|
||||
auditMG := NewMetricsGroup(auditCollectorPath,
|
||||
[]MetricDescriptor{
|
||||
auditFailedMessagesMD,
|
||||
auditTargetQueueLengthMD,
|
||||
auditTotalMessagesMD,
|
||||
},
|
||||
loadAuditMetrics,
|
||||
)
|
||||
|
||||
allMetricGroups := []*MetricsGroup{
|
||||
apiRequestsMG,
|
||||
apiBucketMG,
|
||||
|
@ -313,9 +314,10 @@ func newMetricGroups(r *prometheus.Registry) *metricsV3Collection {
|
|||
clusterUsageObjectsMG,
|
||||
clusterUsageBucketsMG,
|
||||
clusterErasureSetMG,
|
||||
clusterAuditMG,
|
||||
clusterNotificationMG,
|
||||
clusterIAMMG,
|
||||
|
||||
auditMG,
|
||||
}
|
||||
|
||||
// Bucket metrics are special, they always include the bucket label. These
|
||||
|
|
|
@ -34,6 +34,13 @@ These are metrics about requests served by the (current) node.
|
|||
| `/api/bucket` | Metrics over all requests split by bucket labels |
|
||||
| | |
|
||||
|
||||
### Audit metrics
|
||||
|
||||
These are metrics about the minio process and the node.
|
||||
|
||||
| Path | Description |
|
||||
|----------|----------------------------------------|
|
||||
| `/audit` | Metrics related to audit functionality |
|
||||
|
||||
### System metrics
|
||||
|
||||
|
@ -99,6 +106,14 @@ The standard metrics group for GoCollector is not shown below.
|
|||
| `minio_bucket_api_5xx_errors_total` | `counter` | Total number of requests with 5xx errors for a bucket | `bucket,name,type,server,pool_index` |
|
||||
| `minio_bucket_api_ttfb_seconds_distribution` | `counter` | Distribution of time to first byte across API calls for a bucket | `bucket,name,le,type,server,pool_index` |
|
||||
|
||||
### `/audit`
|
||||
|
||||
| Name | Type | Help | Labels |
|
||||
|-----------------------------------|-----------|----------------------------------------------------------|--------------------|
|
||||
| `minio_audit_failed_messages` | `counter` | Total number of messages that failed to send since start | `target_id,server` |
|
||||
| `minio_audit_target_queue_length` | `gauge` | Number of unsent messages in queue for target | `target_id,server` |
|
||||
| `minio_audit_total_messages` | `counter` | Total number of messages sent since start | `target_id,server` |
|
||||
|
||||
### `/system/drive`
|
||||
|
||||
| Name | Type | Help | Labels |
|
||||
|
@ -199,14 +214,6 @@ The standard metrics group for GoCollector is not shown below.
|
|||
| `minio_cluster_health_capacity_usable_total_bytes` | `gauge` | Total cluster usable storage capacity in bytes | |
|
||||
| `minio_cluster_health_capacity_usable_free_bytes` | `gauge` | Total cluster usable storage free in bytes | |
|
||||
|
||||
### `/cluster/audit`
|
||||
|
||||
| Name | Type | Help | Labels |
|
||||
|-------------------------------------------|-----------|----------------------------------------------------------|-------------|
|
||||
| `minio_cluster_audit_failed_messages` | `counter` | Total number of messages that failed to send since start | `target_id` |
|
||||
| `minio_cluster_audit_target_queue_length` | `gauge` | Number of unsent messages in queue for target | `target_id` |
|
||||
| `minio_cluster_audit_total_messages` | `counter` | Total number of messages sent since start | `target_id` |
|
||||
|
||||
### `/cluster/usage/objects`
|
||||
|
||||
| Name | Type | Help | Labels |
|
||||
|
|
Loading…
Reference in New Issue