redis/extra/redisprometheus
dependabot[bot] a923df1984
chore(deps): bump google.golang.org/protobuf in /extra/redisprometheus (#2942)
Bumps google.golang.org/protobuf from 1.28.1 to 1.33.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-19 19:24:57 +02:00
..
README.md feat(extra/redisprometheus): prometheus.Collector implementation for redis clients 2022-07-21 16:02:50 +02:00
collector.go Format code and fix go vet (#2696) 2023-09-20 14:03:44 +03:00
go.mod chore(deps): bump google.golang.org/protobuf in /extra/redisprometheus (#2942) 2024-03-19 19:24:57 +02:00
go.sum chore(deps): bump google.golang.org/protobuf in /extra/redisprometheus (#2942) 2024-03-19 19:24:57 +02:00

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