stats
The prometheus collector turning the fleet’s service statistics into metrics.
- Package
github.com/cs3org/reva/v3/pkg/prom/stats- Source
- pkg/prom/stats · Go reference
Overview
Package stats is the prometheus collector turning the fleet’s service statistics into metrics. It needs no configuration: through the Admin API it finds the services advertising a “stats” invocation and invokes them on a background refresh loop, and it serves the cached results — a scrape never triggers an invocation.
If an owner-attributes file is present (default /etc/revad/owner-attributes.json, a JSON object mapping owner ids to attribute key/value pairs), per-owner samples are folded by those attributes and the attribute keys become metric labels; without the file they collapse into plain totals. owner_attributes limits the labels to the given keys, and owner_attributes_key reads the owner map from one key of the file. The attribute vocabulary is entirely the site’s: reva only forwards it.
Configuration
| Key | Type | Default | Description |
|---|---|---|---|
stats | struct{RefreshInterval string; Namespace string; OwnerAttributesFile string; OwnerAttributesKey string; OwnerAttributes []string} | - | source |