Skip to content

Commit f3b98d8

Browse files
committed
Revise README.md.
1 parent 7130214 commit f3b98d8

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

promexporter/README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Prometheus Groupcache Exporter
22

3-
This exporter extracts statistics from groupcache instances and exports Prometheus metrics.
3+
This exporter extracts statistics from group instances and exports as Prometheus metrics.
44

5-
# Example
5+
## Example
66

77
```go
88
import (
@@ -20,14 +20,17 @@ prometheus.MustRegister(collector)
2020
group := groupcache.NewGroup("mygroup", cacheSize, getter)
2121
```
2222

23-
## Exported Metrics
23+
## Metrics
2424

25+
### Exported from groupcache's `CacheStats()`
2526
- `groupcache_cache_bytes{group,type="main|hot"}`: Gauge of current bytes in use
2627
- `groupcache_cache_evictions_nonexpired_total{group,type="main|hot"}`: Count of cache evictions for non-expired keys due to memory full
2728
- `groupcache_cache_evictions_total{group,type="main|hot"}`: Count of cache evictions
2829
- `groupcache_cache_gets_total{group,type="main|hot"}`: Count of cache gets
2930
- `groupcache_cache_hits_total{group,type="main|hot"}`: Count of cache hits
3031
- `groupcache_cache_items{group,type="main|hot"}`: Gauge of current items in use
32+
33+
### Exported from groupcache's `Stats()`
3134
- `groupcache_get_from_peers_latency_lower{group}`: Represent slowest duration to request value from peers
3235
- `groupcache_gets_total{group}`: Count of cache gets (including from peers, from either main or hot caches)
3336
- `groupcache_hits_total{group}`: Count of cache hits (from either main or hot caches)
@@ -39,6 +42,6 @@ group := groupcache.NewGroup("mygroup", cacheSize, getter)
3942
- `groupcache_peer_loads_total{group}`: Count of loads or cache hits from peers
4043
- `groupcache_server_requests_total{group}`: Count of gets received from peers
4144

42-
# Attribution
45+
## Attribution
4346

44-
This package source was copied from https://github.com/udhos/groupcache_exporter. See LICENSE for MIT license details impacting the contents of this package directory in addition to the LICENSE at the root of this repo for co-existing Apache license details.
47+
This package source originated from https://github.com/udhos/groupcache_exporter. See LICENSE for MIT license details impacting the contents of this package directory in addition to the LICENSE at the root of this repo for co-existing Apache license details.

0 commit comments

Comments
 (0)