metric shows who is currently blocking the cluster or not (#3799)

* master_admin_lock Shows whether cluster is locked now or not
https://github.com/seaweedfs/seaweedfs/issues/3452

* fix metric MasterAdminLock
This commit is contained in:
Konstantin Lebedev
2022-10-08 01:26:29 +05:00
committed by GitHub
parent f8d3ff466d
commit 5db25a8f2a
3 changed files with 14 additions and 0 deletions

View File

@@ -47,6 +47,14 @@ var (
Help: "is leader",
})
MasterAdminLock = prometheus.NewGaugeVec(
prometheus.GaugeOpts{
Namespace: Namespace,
Subsystem: "master",
Name: "admin_lock",
Help: "admin lock",
}, []string{"client"})
MasterReceivedHeartbeatCounter = prometheus.NewCounterVec(
prometheus.CounterOpts{
Namespace: Namespace,
@@ -199,6 +207,7 @@ var (
func init() {
Gather.MustRegister(MasterClientConnectCounter)
Gather.MustRegister(MasterRaftIsleader)
Gather.MustRegister(MasterAdminLock)
Gather.MustRegister(MasterReceivedHeartbeatCounter)
Gather.MustRegister(MasterLeaderChangeCounter)
Gather.MustRegister(MasterReplicaPlacementMismatch)