diff options
| author | zhihao.qu <zhihao.qu@ly.com> | 2022-06-15 11:33:18 +0800 |
|---|---|---|
| committer | zhihao.qu <zhihao.qu@ly.com> | 2022-06-15 11:33:18 +0800 |
| commit | 42d04c581b174d21ecbd137bac87256adeaa9fd3 (patch) | |
| tree | f6d247b8381d21d7af706776b15904e1471720dc /weed/stats/metrics.go | |
| parent | d4ef06cdcf320f8b8b17279586e0738894869eff (diff) | |
| download | seaweedfs-42d04c581b174d21ecbd137bac87256adeaa9fd3.tar.xz seaweedfs-42d04c581b174d21ecbd137bac87256adeaa9fd3.zip | |
feat(filer.sync): add metricsServer in filer.sync.
Metrics include:
(1) the offset of the filer.sync
(2) the last send timestamp of the filer subscription
Diffstat (limited to 'weed/stats/metrics.go')
| -rw-r--r-- | weed/stats/metrics.go | 18 |
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{})) |
