aboutsummaryrefslogtreecommitdiff
path: root/weed/stats/metrics.go
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2022-06-14 22:39:10 -0700
committerGitHub <noreply@github.com>2022-06-14 22:39:10 -0700
commitb8ce05c9047cc95d76b57116affeb4ca7385c34a (patch)
treec3ba7f6463e2c9ff889021c9002e79363ea07676 /weed/stats/metrics.go
parentd4ef06cdcf320f8b8b17279586e0738894869eff (diff)
parent4d0d1848c648c3e2e6596451fa20eabc468239dc (diff)
downloadseaweedfs-b8ce05c9047cc95d76b57116affeb4ca7385c34a.tar.xz
seaweedfs-b8ce05c9047cc95d76b57116affeb4ca7385c34a.zip
Merge pull request #3182 from qzhello/master
feat(filer.sync): add metricsServer in filer.sync.
Diffstat (limited to 'weed/stats/metrics.go')
-rw-r--r--weed/stats/metrics.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/weed/stats/metrics.go b/weed/stats/metrics.go
index 943aafff9..207b37c81 100644
--- a/weed/stats/metrics.go
+++ b/weed/stats/metrics.go
@@ -77,6 +77,14 @@ var (
Buckets: prometheus.ExponentialBuckets(0.0001, 2, 24),
}, []string{"type"})
+ FilerServerLastSendTsOfSubscribeGauge = prometheus.NewGaugeVec(
+ prometheus.GaugeOpts{
+ Namespace: "SeaweedFS",
+ Subsystem: "filer",
+ Name: "last_send_timestamp_of_subscribe",
+ Help: "The last send timestamp of the filer subscription.",
+ }, []string{"sourceFiler", "clientName", "path"})
+
FilerStoreCounter = prometheus.NewCounterVec(
prometheus.CounterOpts{
Namespace: "SeaweedFS",
@@ -94,6 +102,14 @@ var (
Buckets: prometheus.ExponentialBuckets(0.0001, 2, 24),
}, []string{"store", "type"})
+ FilerSyncOffsetGauge = prometheus.NewGaugeVec(
+ prometheus.GaugeOpts{
+ Namespace: "SeaweedFS",
+ Subsystem: "filerSync",
+ Name: "sync_offset",
+ Help: "The offset of the filer synchronization service.",
+ }, []string{"sourceFiler", "targetFiler", "clientName", "path"})
+
VolumeServerRequestCounter = prometheus.NewCounterVec(
prometheus.CounterOpts{
Namespace: "SeaweedFS",
@@ -179,6 +195,8 @@ func init() {
Gather.MustRegister(FilerRequestHistogram)
Gather.MustRegister(FilerStoreCounter)
Gather.MustRegister(FilerStoreHistogram)
+ Gather.MustRegister(FilerSyncOffsetGauge)
+ Gather.MustRegister(FilerServerLastSendTsOfSubscribeGauge)
Gather.MustRegister(collectors.NewGoCollector())
Gather.MustRegister(collectors.NewProcessCollector(collectors.ProcessCollectorOpts{}))