aboutsummaryrefslogtreecommitdiff
path: root/weed/stats/metrics.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2019-06-16 02:44:20 -0700
committerChris Lu <chris.lu@gmail.com>2019-06-16 02:44:20 -0700
commit0fdb1e705d21a5be1ddca8f1cdc64a5c5b65d413 (patch)
tree6aeea7ffff19cc70bd8f779fa479f47232b640b5 /weed/stats/metrics.go
parent289fd7eb39a9150b392a8e29596f9b85ace0534c (diff)
downloadseaweedfs-0fdb1e705d21a5be1ddca8f1cdc64a5c5b65d413.tar.xz
seaweedfs-0fdb1e705d21a5be1ddca8f1cdc64a5c5b65d413.zip
collect volume disk usage metrics
Diffstat (limited to 'weed/stats/metrics.go')
-rw-r--r--weed/stats/metrics.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/weed/stats/metrics.go b/weed/stats/metrics.go
index fccf64d19..2408b607a 100644
--- a/weed/stats/metrics.go
+++ b/weed/stats/metrics.go
@@ -63,6 +63,20 @@ var (
Name: "ecShards",
Help: "Number of EC shards.",
})
+ VolumeServerVolumeSizeGauge = prometheus.NewGauge(
+ prometheus.GaugeOpts{
+ Namespace: "SeaweedFS",
+ Subsystem: "volumeServer",
+ Name: "totalVolumeSize",
+ Help: "Actual disk size used by volumes.",
+ })
+ VolumeServerEcShardSizeGauge = prometheus.NewGauge(
+ prometheus.GaugeOpts{
+ Namespace: "SeaweedFS",
+ Subsystem: "volumeServer",
+ Name: "totalEcShardSize",
+ Help: "Actual disk size used by ec shards.",
+ })
)
func init() {
@@ -74,6 +88,8 @@ func init() {
VolumeServerGather.MustRegister(VolumeServerRequestHistogram)
VolumeServerGather.MustRegister(VolumeServerVolumeCounter)
VolumeServerGather.MustRegister(VolumeServerEcShardCounter)
+ VolumeServerGather.MustRegister(VolumeServerVolumeSizeGauge)
+ VolumeServerGather.MustRegister(VolumeServerEcShardSizeGauge)
}