mirror of https://github.com/go-redis/redis.git
e8ad794e96
* run go fix ./... Signed-off-by: Tiago Peczenyj <tpeczenyj@weborama.com> * run make fmt Signed-off-by: Tiago Peczenyj <tpeczenyj@weborama.com> * fix go vet ./... issues * Update README.md Reorder imports with the rules defined in the Makefile as if we run `make fmt` * run gofumpt -w . * update Makefile to use gofumpt instead gofmt * increment makefile * format test * format tests Signed-off-by: Tiago Peczenyj <tpeczenyj@weborama.com> --------- Signed-off-by: Tiago Peczenyj <tpeczenyj@weborama.com> Co-authored-by: ofekshenawa <104765379+ofekshenawa@users.noreply.github.com> |
||
---|---|---|
.. | ||
README.md | ||
collector.go | ||
go.mod | ||
go.sum |
README.md
Prometheus Metric Collector
This package implements a prometheus.Collector
for collecting metrics about the connection pool used by the various redis clients.
Supported clients are redis.Client
, redis.ClusterClient
, redis.Ring
and redis.UniversalClient
.
Example
client := redis.NewClient(options)
collector := redisprometheus.NewCollector(namespace, subsystem, client)
prometheus.MustRegister(collector)
Metrics
Name | Type | Description |
---|---|---|
pool_hit_total |
Counter metric | number of times a connection was found in the pool |
pool_miss_total |
Counter metric | number of times a connection was not found in the pool |
pool_timeout_total |
Counter metric | number of times a timeout occurred when getting a connection from the pool |
pool_conn_total_current |
Gauge metric | current number of connections in the pool |
pool_conn_idle_current |
Gauge metric | current number of idle connections in the pool |
pool_conn_stale_total |
Counter metric | number of times a connection was removed from the pool because it was stale |