Chris Lu
6 years ago
6 changed files with 88 additions and 2 deletions
-
6weed/command/filer.go
-
7weed/command/server.go
-
29weed/server/filer_server.go
-
9weed/server/filer_server_handlers_read.go
-
8weed/server/filer_server_handlers_write.go
-
27weed/server/metrics.go
@ -0,0 +1,27 @@ |
|||||
|
package weed_server |
||||
|
|
||||
|
import "github.com/prometheus/client_golang/prometheus" |
||||
|
|
||||
|
var ( |
||||
|
filerRequestCounter = prometheus.NewCounterVec( |
||||
|
prometheus.CounterOpts{ |
||||
|
Namespace: "SeaweedFS", |
||||
|
Subsystem: "filer", |
||||
|
Name: "request_total", |
||||
|
Help: "Counter of filer requests.", |
||||
|
}, []string{"type"}) |
||||
|
|
||||
|
filerRequestHistogram = prometheus.NewHistogramVec( |
||||
|
prometheus.HistogramOpts{ |
||||
|
Namespace: "SeaweedFS", |
||||
|
Subsystem: "filer", |
||||
|
Name: "request_seconds", |
||||
|
Help: "Bucketed histogram of filer request processing time.", |
||||
|
Buckets: prometheus.ExponentialBuckets(0.0005, 2, 18), |
||||
|
}, []string{"type"}) |
||||
|
) |
||||
|
|
||||
|
func init() { |
||||
|
prometheus.MustRegister(filerRequestCounter) |
||||
|
prometheus.MustRegister(filerRequestHistogram) |
||||
|
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue