mirror of
https://github.com/prometheus/statsd_exporter.git
synced 2025-01-09 14:05:25 +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"
|
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
|
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:
|
configuration to specify a custom help text for each mapping:
|
||||||
```yaml
|
```yaml
|
||||||
|
|
Loading…
Reference in a new issue