|
|
@ -53,18 +53,19 @@ const ( |
|
|
|
capacityRawSubsystem MetricSubsystem = "capacity_raw" |
|
|
|
capacityRawSubsystem MetricSubsystem = "capacity_raw" |
|
|
|
capacityUsableSubsystem MetricSubsystem = "capacity_usable" |
|
|
|
capacityUsableSubsystem MetricSubsystem = "capacity_usable" |
|
|
|
diskSubsystem MetricSubsystem = "disk" |
|
|
|
diskSubsystem MetricSubsystem = "disk" |
|
|
|
|
|
|
|
fileDescriptorSubsystem MetricSubsystem = "file_descriptor" |
|
|
|
goRoutines MetricSubsystem = "go_routine" |
|
|
|
goRoutines MetricSubsystem = "go_routine" |
|
|
|
|
|
|
|
ioSubsystem MetricSubsystem = "io" |
|
|
|
nodesSubsystem MetricSubsystem = "nodes" |
|
|
|
nodesSubsystem MetricSubsystem = "nodes" |
|
|
|
objectsSubsystem MetricSubsystem = "objects" |
|
|
|
objectsSubsystem MetricSubsystem = "objects" |
|
|
|
fileDescriptorSubsystem MetricSubsystem = "file_descriptor" |
|
|
|
processSubsystem MetricSubsystem = "process" |
|
|
|
ioSubsystem MetricSubsystem = "io" |
|
|
|
|
|
|
|
replicationSubsystem MetricSubsystem = "replication" |
|
|
|
replicationSubsystem MetricSubsystem = "replication" |
|
|
|
requestsSubsystem MetricSubsystem = "requests" |
|
|
|
requestsSubsystem MetricSubsystem = "requests" |
|
|
|
timeSubsystem MetricSubsystem = "time" |
|
|
|
timeSubsystem MetricSubsystem = "time" |
|
|
|
trafficSubsystem MetricSubsystem = "traffic" |
|
|
|
trafficSubsystem MetricSubsystem = "traffic" |
|
|
|
|
|
|
|
softwareSubsystem MetricSubsystem = "software" |
|
|
|
sysCallSubsystem MetricSubsystem = "syscall" |
|
|
|
sysCallSubsystem MetricSubsystem = "syscall" |
|
|
|
usageSubsystem MetricSubsystem = "usage" |
|
|
|
usageSubsystem MetricSubsystem = "usage" |
|
|
|
softwareSubsystem MetricSubsystem = "software" |
|
|
|
|
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
// MetricName are the individual names for the metric.
|
|
|
|
// MetricName are the individual names for the metric.
|
|
|
@ -107,6 +108,7 @@ const ( |
|
|
|
ttfbDistribution = "ttbf_seconds_distribution" |
|
|
|
ttfbDistribution = "ttbf_seconds_distribution" |
|
|
|
|
|
|
|
|
|
|
|
lastActivityTime = "last_activity_nano_seconds" |
|
|
|
lastActivityTime = "last_activity_nano_seconds" |
|
|
|
|
|
|
|
startTime = "starttime_seconds" |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
const ( |
|
|
|
const ( |
|
|
@ -631,6 +633,15 @@ func getMinIOGORoutineCountMD() MetricDescription { |
|
|
|
Type: gaugeMetric, |
|
|
|
Type: gaugeMetric, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
func getMinIOProcessStartTimeMD() MetricDescription { |
|
|
|
|
|
|
|
return MetricDescription{ |
|
|
|
|
|
|
|
Namespace: nodeMetricNamespace, |
|
|
|
|
|
|
|
Subsystem: processSubsystem, |
|
|
|
|
|
|
|
Name: startTime, |
|
|
|
|
|
|
|
Help: "Start time for MinIO process per node in seconds.", |
|
|
|
|
|
|
|
Type: gaugeMetric, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
func getMinioProcMetrics() MetricsGroup { |
|
|
|
func getMinioProcMetrics() MetricsGroup { |
|
|
|
return MetricsGroup{ |
|
|
|
return MetricsGroup{ |
|
|
|
Metrics: []Metric{}, |
|
|
|
Metrics: []Metric{}, |
|
|
@ -656,6 +667,16 @@ func getMinioProcMetrics() MetricsGroup { |
|
|
|
logger.LogOnceIf(ctx, err, ioSubsystem) |
|
|
|
logger.LogOnceIf(ctx, err, ioSubsystem) |
|
|
|
return |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
stat, err := p.Stat() |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
logger.LogOnceIf(ctx, err, processSubsystem) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
startTime, err := stat.StartTime() |
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
|
|
|
logger.LogOnceIf(ctx, err, startTime) |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
metrics.Metrics = append(metrics.Metrics, |
|
|
|
metrics.Metrics = append(metrics.Metrics, |
|
|
|
Metric{ |
|
|
|
Metric{ |
|
|
@ -698,6 +719,11 @@ func getMinioProcMetrics() MetricsGroup { |
|
|
|
Description: getMinioProcessIOWriteCachedBytesMD(), |
|
|
|
Description: getMinioProcessIOWriteCachedBytesMD(), |
|
|
|
Value: float64(io.WChar), |
|
|
|
Value: float64(io.WChar), |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
metrics.Metrics = append(metrics.Metrics, |
|
|
|
|
|
|
|
Metric{ |
|
|
|
|
|
|
|
Description: getMinIOProcessStartTimeMD(), |
|
|
|
|
|
|
|
Value: startTime, |
|
|
|
|
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|