-
Notifications
You must be signed in to change notification settings - Fork 2
/
pano-kafka-dns.yaml
194 lines (194 loc) · 4.08 KB
/
pano-kafka-dns.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
log-level: error
metricsSettings:
port: 9102
suppressGoMetrics: true
prefix: pano_dns_
pipeline:
- name: ingest
# query_count
- name: prom_query_count
follows: ingest
# query_name
- name: aggregate_query_name
follows: ingest
- name: filter_query_name
follows: aggregate_query_name
- name: prom_query_name
follows: filter_query_name
# qtype
- name: aggregate_qtype
follows: ingest
- name: filter_qtype
follows: aggregate_qtype
- name: prom_qtype
follows: filter_qtype
# rcode
- name: aggregate_rcode
follows: ingest
- name: filter_rcode
follows: aggregate_rcode
- name: prom_rcode
follows: filter_rcode
# rtt_avg
- name: aggregate_rtt_avg
follows: ingest
- name: prom_rtt_avg
follows: aggregate_rtt_avg
# rtt_hist
- name: aggregate_rtt_hist
follows: ingest
- name: prom_rtt_hist
follows: aggregate_rtt_hist
parameters:
- name: ingest
ingest:
type: kafka
kafka:
brokers: ["localhost:9092"]
topic: dns
decoder:
type: json
# query_count
- name: prom_query_count
encode:
type: prom
prom:
prefix: pano_dns_
metrics:
- name: query_count
type: counter
# query_name
- name: aggregate_query_name
extract:
type: aggregates
aggregates:
rules:
- name: query_name
groupByKeys:
- query
operationType: count
operationKey: query
- name: filter_query_name
transform:
type: filter
filter:
rules:
- input: query
type: remove_entry_if_doesnt_exist
- name: prom_query_name
encode:
type: prom
prom:
prefix: pano_dns_
metrics:
- name: query_name
type: counter
valueKey: recent_op_value
labels:
- query
# qtype
- name: aggregate_qtype
extract:
type: aggregates
aggregates:
rules:
- name: qtype_count
groupByKeys:
- qtype_name
operationType: count
operationKey: qtype
- name: filter_qtype
transform:
type: filter
filter:
rules:
- input: qtype_name
type: remove_entry_if_doesnt_exist
- name: prom_qtype
encode:
type: prom
prom:
prefix: pano_dns_
metrics:
- name: qtype_total
type: counter
valueKey: recent_op_value
labels:
- qtype_name
# rcode
- name: aggregate_rcode
extract:
type: aggregates
aggregates:
rules:
- name: rcode_count
groupByKeys:
- rcode_name
operationType: count
operationKey: rcode
- name: filter_rcode
transform:
type: filter
filter:
rules:
- input: rcode_name
type: remove_entry_if_doesnt_exist
- name: prom_rcode
encode:
type: prom
prom:
prefix: pano_dns_
metrics:
- name: rcode_total
type: counter
valueKey: recent_op_value
labels:
- rcode_name
# rtt_avg
- name: aggregate_rtt_avg
extract:
type: aggregates
aggregates:
rules:
- name: aggr_rtt_avg
groupByKeys:
- id_resp_h
operationType: avg
operationKey: rtt
- name: prom_rtt_avg
encode:
type: prom
prom:
prefix: pano_dns_
metrics:
- name: rtt_avg
type: gauge
labels:
- id_resp_h
valueKey: recent_op_value
# rtt_hist
- name: aggregate_rtt_hist
extract:
type: aggregates
aggregates:
rules:
- name: aggr_rtt_hist
operationType: raw_values
operationKey: rtt
- name: prom_rtt_hist
encode:
type: prom
prom:
prefix: pano_dns_
metrics:
- name: rtt_histogram
type: agg_histogram
valueKey: recent_raw_values
buckets:
- 0.00001
- 0.0001
- 0.001
- 0.01
- 0.10
- 1.00
- 10.00