aboutsummaryrefslogtreecommitdiff
path: root/weed/stats/metrics.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-06-16 02:24:15 -0700
committerChris Lu <chris.lu@gmail.com>2019-06-16 02:24:15 -0700
commit289fd7eb39a9150b392a8e29596f9b85ace0534c (patch)
treeaa6d6f725b577174a75538169f4b4dc59ea6c4a1 /weed/stats/metrics.go
parentff6a6dd11e55e89dfeed0eb31da8a20a7e7e6e9f (diff)
downloadseaweedfs-289fd7eb39a9150b392a8e29596f9b85ace0534c.tar.xz
seaweedfs-289fd7eb39a9150b392a8e29596f9b85ace0534c.zip
count number of volumes and ec shards
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 a6e96d496..fccf64d19 100644
--- a/weed/stats/metrics.go
+++ b/weed/stats/metrics.go
@@ -55,6 +55,14 @@ var (
Name: "volumes",
Help: "Number of volumes.",
})
+
+ VolumeServerEcShardCounter = prometheus.NewGauge(
+ prometheus.GaugeOpts{
+ Namespace: "SeaweedFS",
+ Subsystem: "volumeServer",
+ Name: "ecShards",
+ Help: "Number of EC shards.",
+ })
)
func init() {
@@ -65,6 +73,7 @@ func init() {
VolumeServerGather.MustRegister(VolumeServerRequestCounter)
VolumeServerGather.MustRegister(VolumeServerRequestHistogram)
VolumeServerGather.MustRegister(VolumeServerVolumeCounter)
+ VolumeServerGather.MustRegister(VolumeServerEcShardCounter)
}