aboutsummaryrefslogtreecommitdiff
path: root/weed/stats/metrics.go
diff options
context:
space:
mode:
authorKonstantin Lebedev <9497591+kmlebedev@users.noreply.github.com>2024-09-04 20:16:44 +0500
committerGitHub <noreply@github.com>2024-09-04 08:16:44 -0700
commit67a252ee8a0cbcf0f33cb7c94de21d4791ef1f39 (patch)
tree36c494fa2bba916714cd0ac53e9070a4a1295d6b /weed/stats/metrics.go
parenteb02946c977be57a0325d9ed86847699e99661c1 (diff)
downloadseaweedfs-67a252ee8a0cbcf0f33cb7c94de21d4791ef1f39.tar.xz
seaweedfs-67a252ee8a0cbcf0f33cb7c94de21d4791ef1f39.zip
[master] refactor func ShouldGrowVolumes (#5884)
Diffstat (limited to 'weed/stats/metrics.go')
-rw-r--r--weed/stats/metrics.go19
1 files changed, 14 insertions, 5 deletions
diff --git a/weed/stats/metrics.go b/weed/stats/metrics.go
index 134485946..956bf4009 100644
--- a/weed/stats/metrics.go
+++ b/weed/stats/metrics.go
@@ -70,13 +70,21 @@ var (
Help: "replica placement mismatch",
}, []string{"collection", "id"})
- MasterVolumeLayout = prometheus.NewGaugeVec(
+ MasterVolumeLayoutWritable = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Namespace: Namespace,
Subsystem: "master",
- Name: "volume_layout_total",
- Help: "Number of volumes in volume layouts",
- }, []string{"collection", "dataCenter", "type"})
+ Name: "volume_layout_writable",
+ Help: "Number of writable volumes in volume layouts",
+ }, []string{"collection", "disk", "rp", "ttl"})
+
+ MasterVolumeLayoutCrowded = prometheus.NewGaugeVec(
+ prometheus.GaugeOpts{
+ Namespace: Namespace,
+ Subsystem: "master",
+ Name: "volume_layout_crowded",
+ Help: "Number of crowded volumes in volume layouts",
+ }, []string{"collection", "disk", "rp", "ttl"})
MasterPickForWriteErrorCounter = prometheus.NewCounter(
prometheus.CounterOpts{
@@ -281,7 +289,8 @@ func init() {
Gather.MustRegister(MasterReceivedHeartbeatCounter)
Gather.MustRegister(MasterLeaderChangeCounter)
Gather.MustRegister(MasterReplicaPlacementMismatch)
- Gather.MustRegister(MasterVolumeLayout)
+ Gather.MustRegister(MasterVolumeLayoutWritable)
+ Gather.MustRegister(MasterVolumeLayoutCrowded)
Gather.MustRegister(FilerRequestCounter)
Gather.MustRegister(FilerHandlerCounter)