Merge pull request #118 from prometheus/grobie/readme-metrics-naming

Use _total suffix for counters
This commit is contained in:
Matthias Rampke 2018-01-18 09:12:20 +01:00 committed by GitHub
commit 76f5f422b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -130,7 +130,7 @@ wildcard match in the matching line. That allows for dynamic rewrites, such as:
```yaml
mappings:
- match: test.*.*.counter
name: "${2}_counter"
name: "${2}_total"
labels:
provider: "$1"
```
@ -142,7 +142,7 @@ could be written as:
mappings:
- match: test\.(\w+)\.(\w+)\.counter
match_type: regex
name: "${2}_counter"
name: "${2}_total"
labels:
provider: "$1"
```
@ -152,6 +152,7 @@ label names.
If the default metric help text is insufficient for your needs you may use the YAML
configuration to specify a custom help text for each mapping:
```yaml
mappings:
- match: http.request.*