Updated Prometheus metrics (#11141)
* Add metrics for nodes online and offline * Add cluster capacity metrics * Introduce v2 metricsmaster
parent
3bda8f755c
commit
b4add82bb6
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,54 @@ |
|||||||
|
/* |
||||||
|
* MinIO Cloud Storage, (C) 2020 MinIO, Inc. |
||||||
|
* |
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
||||||
|
* you may not use this file except in compliance with the License. |
||||||
|
* You may obtain a copy of the License at |
||||||
|
* |
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
* |
||||||
|
* Unless required by applicable law or agreed to in writing, software |
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, |
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||||
|
* See the License for the specific language governing permissions and |
||||||
|
* limitations under the License. |
||||||
|
* |
||||||
|
*/ |
||||||
|
|
||||||
|
package cmd |
||||||
|
|
||||||
|
import ( |
||||||
|
"context" |
||||||
|
) |
||||||
|
|
||||||
|
// GetTotalCapacity gets the total capacity in the cluster.
|
||||||
|
func GetTotalCapacity(ctx context.Context) (capacity uint64) { |
||||||
|
d := globalNotificationSys.DiskHwInfo(ctx) |
||||||
|
for _, s := range d { |
||||||
|
capacity += s.GetTotalCapacity() |
||||||
|
} |
||||||
|
return |
||||||
|
} |
||||||
|
|
||||||
|
// GetTotalUsableCapacity gets the total usable capacity in the cluster.
|
||||||
|
func GetTotalUsableCapacity(ctx context.Context, s StorageInfo) (capacity float64) { |
||||||
|
raw := GetTotalCapacity(ctx) |
||||||
|
ratio := float64(s.Backend.StandardSCData) / float64(s.Backend.StandardSCData+s.Backend.StandardSCParity) |
||||||
|
return float64(raw) * ratio |
||||||
|
} |
||||||
|
|
||||||
|
// GetTotalCapacityFree gets the total capacity free in the cluster.
|
||||||
|
func GetTotalCapacityFree(ctx context.Context) (capacity uint64) { |
||||||
|
d := globalNotificationSys.DiskHwInfo(ctx) |
||||||
|
for _, s := range d { |
||||||
|
capacity += s.GetTotalFreeCapacity() |
||||||
|
} |
||||||
|
return |
||||||
|
} |
||||||
|
|
||||||
|
// GetTotalUsableCapacityFree gets the total usable capacity free in the cluster.
|
||||||
|
func GetTotalUsableCapacityFree(ctx context.Context, s StorageInfo) (capacity float64) { |
||||||
|
raw := GetTotalCapacityFree(ctx) |
||||||
|
ratio := float64(s.Backend.StandardSCData) / float64(s.Backend.StandardSCData+s.Backend.StandardSCParity) |
||||||
|
return float64(raw) * ratio |
||||||
|
} |
@ -0,0 +1,47 @@ |
|||||||
|
# List of metrics reported cluster wide |
||||||
|
|
||||||
|
Each metric includes a label for the server that calculated the metric. |
||||||
|
Each metric has a label for the server that generated the metric. |
||||||
|
|
||||||
|
These metrics can be from any MinIO server once per collection. |
||||||
|
|
||||||
|
| Name | Description | |
||||||
|
|:-----------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------| |
||||||
|
|`minio_bucket_objects_size_distribution` |Distribution of object sizes in the bucket, includes label for the bucket name. | |
||||||
|
|`minio_bucket_replication_failed_bytes` |Total number of bytes failed at least once to replicate. | |
||||||
|
|`minio_bucket_replication_pending_bytes` |Total bytes pending to replicate. | |
||||||
|
|`minio_bucket_replication_received_bytes` |Total number of bytes replicated to this bucket from another source bucket. | |
||||||
|
|`minio_bucket_replication_sent_bytes` |Total number of bytes replicated to the target bucket. | |
||||||
|
|`minio_bucket_usage_object_total` |Total number of objects | |
||||||
|
|`minio_bucket_usage_total_bytes` |Total bucket size in bytes | |
||||||
|
|`minio_cluster_capacity_raw_free_bytes` |Total free capacity online in the cluster. | |
||||||
|
|`minio_cluster_capacity_raw_total_bytes` |Total capacity online in the cluster. | |
||||||
|
|`minio_cluster_capacity_usable_free_bytes` |Total free usable capacity online in the cluster. | |
||||||
|
|`minio_cluster_capacity_usable_total_bytes` |Total usable capacity online in the cluster. | |
||||||
|
|`minio_cluster_disk_offline_total` |Total disks offline. | |
||||||
|
|`minio_cluster_disk_online_total` |Total disks online. | |
||||||
|
|`minio_cluster_nodes_offline_total` |Total number of MinIO nodes offline. | |
||||||
|
|`minio_cluster_nodes_online_total` |Total number of MinIO nodes online. | |
||||||
|
|`minio_heal_objects_error_total` |Objects for which healing failed in current self healing run | |
||||||
|
|`minio_heal_objects_heal_total` |Objects healed in current self healing run | |
||||||
|
|`minio_heal_objects_total` |Objects scanned in current self healing run | |
||||||
|
|`minio_heal_time_last_activity_nano_seconds` |Time elapsed (in nano seconds) since last self healing activity. This is set to -1 until initial self heal activity | |
||||||
|
|`minio_inter_node_traffic_received_bytes` |Total number of bytes received from other peer nodes. | |
||||||
|
|`minio_inter_node_traffic_sent_bytes` |Total number of bytes sent to the other peer nodes. | |
||||||
|
|`minio_node_disk_free_bytes` |Total storage available on a disk. | |
||||||
|
|`minio_node_disk_total_bytes` |Total storage on a disk. | |
||||||
|
|`minio_node_disk_used_bytes` |Total storage used on a disk. | |
||||||
|
|`minio_s3_requests_error_total` |Total number S3 requests with errors | |
||||||
|
|`minio_s3_requests_inflight_total` |Total number of S3 requests currently in flight. | |
||||||
|
|`minio_s3_requests_total` |Total number S3 requests | |
||||||
|
|`minio_s3_time_ttbf_seconds_distribution` |Distribution of the time to first byte across API calls. | |
||||||
|
|`minio_s3_traffic_received_bytes` |Total number of s3 bytes received. | |
||||||
|
|`minio_s3_traffic_sent_bytes` |Total number of s3 bytes sent | |
||||||
|
|`minio_cache_hits_total` |Total number of disk cache hits | |
||||||
|
|`minio_cache_missed_total` |Total number of disk cache misses | |
||||||
|
|`minio_cache_sent_bytes` |Total number of bytes served from cache | |
||||||
|
|`minio_cache_total_bytes` |Total size of cache disk in bytes | |
||||||
|
|`minio_cache_usage_info` |Total percentage cache usage, value of 1 indicates high and 0 low, label level is set as well | |
||||||
|
|`minio_cache_used_bytes` |Current cache usage in bytes | |
||||||
|
|`minio_software_commit_info` |Git commit hash for the MinIO release. | |
||||||
|
|`minio_software_version_info` |MinIO Release tag for the server | |
Loading…
Reference in new issue