diff options
| author | Chris Lu <chris.lu@gmail.com> | 2019-06-16 21:56:41 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2019-06-16 21:56:41 -0700 |
| commit | 935639b9086b625fc7006874c6ee491293748f1d (patch) | |
| tree | ecfed42de1556eef5683ce7d9279341e73342b34 /weed/stats/metrics.go | |
| parent | 0fdb1e705d21a5be1ddca8f1cdc64a5c5b65d413 (diff) | |
| download | seaweedfs-935639b9086b625fc7006874c6ee491293748f1d.tar.xz seaweedfs-935639b9086b625fc7006874c6ee491293748f1d.zip | |
metrics: disk size for <collection, normal/EC>
Diffstat (limited to 'weed/stats/metrics.go')
| -rw-r--r-- | weed/stats/metrics.go | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/weed/stats/metrics.go b/weed/stats/metrics.go index 2408b607a..d487768af 100644 --- a/weed/stats/metrics.go +++ b/weed/stats/metrics.go @@ -60,23 +60,17 @@ var ( prometheus.GaugeOpts{ Namespace: "SeaweedFS", Subsystem: "volumeServer", - Name: "ecShards", + Name: "ec_shards", Help: "Number of EC shards.", }) - VolumeServerVolumeSizeGauge = prometheus.NewGauge( + + VolumeServerDiskSizeGauge = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Namespace: "SeaweedFS", Subsystem: "volumeServer", - Name: "totalVolumeSize", + Name: "total_disk_size", 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.", - }) + }, []string{"collection", "type"}) ) func init() { @@ -88,8 +82,7 @@ func init() { VolumeServerGather.MustRegister(VolumeServerRequestHistogram) VolumeServerGather.MustRegister(VolumeServerVolumeCounter) VolumeServerGather.MustRegister(VolumeServerEcShardCounter) - VolumeServerGather.MustRegister(VolumeServerVolumeSizeGauge) - VolumeServerGather.MustRegister(VolumeServerEcShardSizeGauge) + VolumeServerGather.MustRegister(VolumeServerDiskSizeGauge) } |
