Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
aos
GitHub Repository: aos/grafana-agent
Path: blob/main/component/prometheus/exporter/statsd/testdata/mapTest.yaml
4096 views
1
defaults:
2
observer_type: histogram
3
histogram_options:
4
buckets: [.005, .01, .025, .05, .1, .25, .5, 1, 2.5 ]
5
native_histogram_bucket_factor: 1.1
6
native_histogram_max_buckets: 256
7
summary_options:
8
quantiles:
9
- quantile: 0.99
10
error: 0.001
11
- quantile: 0.95
12
error: 0.01
13
- quantile: 0.9
14
error: 0.05
15
- quantile: 0.5
16
error: 0.005
17
max_age: 5m
18
age_buckets: 2
19
buf_cap: 1000
20
match_type: glob
21
glob_disable_ordering: false
22
ttl: 0 # metrics do not expire
23
mappings:
24
# This will be a histogram using the buckets set in `defaults`.
25
- match: "test.timing.*.*.*"
26
name: "my_timer"
27
labels:
28
provider: "$2"
29
outcome: "$3"
30
job: "${1}_server"
31
# This will be a summary using the summary_options set in `defaults`
32
- match: "other.distribution.*.*.*"
33
observer_type: summary
34
name: "other_distribution"
35
labels:
36
provider: "$2"
37
outcome: "$3"
38
job: "${1}_server_other"
39
- match: "test\\.(\\w+)\\.(\\w+)\\.counter"
40
match_type: regex
41
name: "${2}_total"
42
labels:
43
provider: "$1"
44
- match: "(.*)\\.(.*)--(.*)\\.status\\.(.*)\\.count"
45
match_type: regex
46
name: "request_total"
47
labels:
48
hostname: "$1"
49
exec: "$2"
50
protocol: "$3"
51
code: "$4"
52
- match: "test\\.(\\w+)\\.(\\w+)\\.counter"
53
match_type: regex
54
name: "${2}_total"
55
labels:
56
provider: "$1"
57
- match: ".+"
58
match_type: regex
59
name: "$0"
60
labels:
61
statsd_metric_name: "$0"
62
- match: "http.request.*"
63
help: "Total number of http requests"
64
name: "http_requests_total"
65
labels:
66
code: "$1"
67
- match: "test.timing.*.*.*"
68
observer_type: summary
69
name: "my_timer"
70
labels:
71
provider: "$2"
72
outcome: "$3"
73
job: "${1}_server"
74
summary_options:
75
quantiles:
76
- quantile: 0.99
77
error: 0.001
78
- quantile: 0.95
79
error: 0.01
80
- quantile: 0.9
81
error: 0.05
82
- quantile: 0.5
83
error: 0.005
84
max_age: 30s
85
age_buckets: 3
86
buf_cap: 1000
87
- match: "test.timing.*.*.*"
88
observer_type: histogram
89
histogram_options:
90
buckets: [ 0.01, 0.025, 0.05, 0.1 ]
91
native_histogram_bucket_factor: 1.1
92
native_histogram_max_buckets: 256
93
name: "my_timer"
94
labels:
95
provider: "$2"
96
outcome: "$3"
97
job: "${1}_server"
98
# This metric would match as normal.
99
- match: "test.timing.*.*.*"
100
name: "my_timer"
101
labels:
102
provider: "$2"
103
outcome: "$3"
104
job: "${1}_server"
105
# Any metric not matched will be dropped because "." matches all metrics.
106
- match: "."
107
match_type: regex
108
action: drop
109
name: "dropped"
110