aboutsummaryrefslogtreecommitdiff
path: root/weed/stats/metrics.go
diff options
context:
space:
mode:
authorKonstantin Lebedev <9497591+kmlebedev@users.noreply.github.com>2024-03-22 19:39:11 +0500
committerGitHub <noreply@github.com>2024-03-22 07:39:11 -0700
commitdc9568fc0d418f27bef4f13efca6ee918e559fbd (patch)
tree1ee1f78376965a1f7e6c8eac7a62f5faf2b41da2 /weed/stats/metrics.go
parent953f5713490343f3cb4d36eb17bae9e8716068b4 (diff)
downloadseaweedfs-dc9568fc0d418f27bef4f13efca6ee918e559fbd.tar.xz
seaweedfs-dc9568fc0d418f27bef4f13efca6ee918e559fbd.zip
[master] add test for PickForWrite add metrics for volume layout (#5413)
Diffstat (limited to 'weed/stats/metrics.go')
-rw-r--r--weed/stats/metrics.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/weed/stats/metrics.go b/weed/stats/metrics.go
index 49a3b090b..f61f68e08 100644
--- a/weed/stats/metrics.go
+++ b/weed/stats/metrics.go
@@ -70,6 +70,14 @@ var (
Help: "replica placement mismatch",
}, []string{"collection", "id"})
+ MasterVolumeLayout = prometheus.NewGaugeVec(
+ prometheus.GaugeOpts{
+ Namespace: Namespace,
+ Subsystem: "master",
+ Name: "volume_layout_total",
+ Help: "Number of volumes in volume layouts",
+ }, []string{"collection", "replica", "type"})
+
MasterLeaderChangeCounter = prometheus.NewCounterVec(
prometheus.CounterOpts{
Namespace: Namespace,
@@ -259,6 +267,7 @@ func init() {
Gather.MustRegister(MasterReceivedHeartbeatCounter)
Gather.MustRegister(MasterLeaderChangeCounter)
Gather.MustRegister(MasterReplicaPlacementMismatch)
+ Gather.MustRegister(MasterVolumeLayout)
Gather.MustRegister(FilerRequestCounter)
Gather.MustRegister(FilerHandlerCounter)