forked from mirrors/statsd_exporter
Merge pull request #372 from matthiasr/mr/fix-yaml-backslash-quoting
Escape backslashes in regex examples
This commit is contained in:
commit
8b496dfab5
1 changed files with 3 additions and 3 deletions
|
@ -277,7 +277,7 @@ mappings:
|
||||||
labels:
|
labels:
|
||||||
provider: "$1"
|
provider: "$1"
|
||||||
mappings:
|
mappings:
|
||||||
- match: "(.*)\.(.*)--(.*)\.status\.(.*)\.count"
|
- match: "(.*)\\.(.*)--(.*)\\.status\.(.*)\\.count"
|
||||||
match_type: regex
|
match_type: regex
|
||||||
name: "request_total"
|
name: "request_total"
|
||||||
labels:
|
labels:
|
||||||
|
@ -290,7 +290,7 @@ mappings:
|
||||||
Be aware about yaml escape rules as a mapping like the following one will not work.
|
Be aware about yaml escape rules as a mapping like the following one will not work.
|
||||||
```yaml
|
```yaml
|
||||||
mappings:
|
mappings:
|
||||||
- match: "test\.(\w+)\.(\w+)\.counter"
|
- match: "test\\.(\w+)\\.(\w+)\\.counter"
|
||||||
match_type: regex
|
match_type: regex
|
||||||
name: "${2}_total"
|
name: "${2}_total"
|
||||||
labels:
|
labels:
|
||||||
|
@ -402,7 +402,7 @@ parameter is specified the default value of `glob` will be assumed:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
mappings:
|
mappings:
|
||||||
- match: "(.*)\.(.*)--(.*)\.status\.(.*)\.count"
|
- match: "(.*)\\.(.*)--(.*)\\.status\\.(.*)\\.count"
|
||||||
match_type: regex
|
match_type: regex
|
||||||
name: "request_total"
|
name: "request_total"
|
||||||
labels:
|
labels:
|
||||||
|
|
Loading…
Reference in a new issue