diff options
| author | Konstantin Lebedev <9497591+kmlebedev@users.noreply.github.com> | 2022-10-08 01:26:29 +0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-07 13:26:29 -0700 |
| commit | 5db25a8f2ad235c40c2b19306a6a49b5c4715331 (patch) | |
| tree | a1e37ce03659f24845b3c331aa103ad2fb5f46ab /weed/stats/metrics.go | |
| parent | f8d3ff466d8d2360c39132910710f5a33cf2b2be (diff) | |
| download | seaweedfs-5db25a8f2ad235c40c2b19306a6a49b5c4715331.tar.xz seaweedfs-5db25a8f2ad235c40c2b19306a6a49b5c4715331.zip | |
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
Diffstat (limited to 'weed/stats/metrics.go')
| -rw-r--r-- | weed/stats/metrics.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/weed/stats/metrics.go b/weed/stats/metrics.go index 9947e2316..d1723fdc6 100644 --- a/weed/stats/metrics.go +++ b/weed/stats/metrics.go @@ -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) |
