mirror of
https://github.com/prometheus/statsd_exporter.git
synced 2024-12-22 21:46:28 +00:00
document metric name templating for regex matches
This commit is contained in:
parent
27ee4050c4
commit
515ae0ee89
1 changed files with 12 additions and 0 deletions
12
README.md
12
README.md
|
@ -135,6 +135,18 @@ mappings:
|
|||
provider: "$1"
|
||||
```
|
||||
|
||||
The metric name can also contain references to regex matches. The mapping above
|
||||
could be written as:
|
||||
|
||||
```
|
||||
mappings:
|
||||
- match: test\.(\w+)\.(\w+)\.counter
|
||||
match_type: regex
|
||||
name: "${2}_counter"
|
||||
labels:
|
||||
provider: "$1"
|
||||
```
|
||||
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue