aboutsummaryrefslogtreecommitdiff
path: root/weed/stats/metrics.go
diff options
context:
space:
mode:
authorhilimd <68371223+hilimd@users.noreply.github.com>2020-10-26 22:01:50 +0800
committerGitHub <noreply@github.com>2020-10-26 22:01:50 +0800
commit843865f2ca534bb6286b7a3d79c436384d875608 (patch)
tree653943fe04caf3fe607416715fb341460a624ab7 /weed/stats/metrics.go
parentcf7a1c722fa82fa78c546f68e4814fff7dc6d1e2 (diff)
parent44921220b01d21c64755cbc7560ff8932f71984d (diff)
downloadseaweedfs-843865f2ca534bb6286b7a3d79c436384d875608.tar.xz
seaweedfs-843865f2ca534bb6286b7a3d79c436384d875608.zip
Merge pull request #33 from chrislusf/master
sync
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 13ab3bae1..3f5d851a4 100644
--- a/weed/stats/metrics.go
+++ b/weed/stats/metrics.go
@@ -101,6 +101,14 @@ var (
Help: "Actual disk size used by volumes.",
}, []string{"collection", "type"})
+ VolumeServerResourceGauge = prometheus.NewGaugeVec(
+ prometheus.GaugeOpts{
+ Namespace: "SeaweedFS",
+ Subsystem: "volumeServer",
+ Name: "resource",
+ Help: "Resource usage",
+ }, []string{"name", "type"})
+
S3RequestCounter = prometheus.NewCounterVec(
prometheus.CounterOpts{
Namespace: "SeaweedFS",
@@ -132,6 +140,7 @@ func init() {
Gather.MustRegister(VolumeServerMaxVolumeCounter)
Gather.MustRegister(VolumeServerReadOnlyVolumeGauge)
Gather.MustRegister(VolumeServerDiskSizeGauge)
+ Gather.MustRegister(VolumeServerResourceGauge)
Gather.MustRegister(S3RequestCounter)
Gather.MustRegister(S3RequestHistogram)