-
Notifications
You must be signed in to change notification settings - Fork 0
/
benthos-config.yaml
65 lines (62 loc) · 1.33 KB
/
benthos-config.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
http:
enabled: true
address: 0.0.0.0:4195
root_path: /
debug_endpoints: false
input:
generate:
count: 100000000
interval: ""
mapping: |
this = root
root.answer = counter()
root.contract = if root.answer % 2 == 0 {
"a"
} else {
"b"
}
pipeline:
threads: -1
processors:
- label: "sleep"
sleep:
duration: "5s"
- label: "log_line"
log:
level: INFO
fields_mapping: ""
message: "${! this }"
- label: "filter"
bloblang: |
root = if this.answer < 10 {
deleted()
}
- label: mock_benthos_gauge_metric
metric:
type: gauge
name: mock_benthos_gauge
labels:
contract: "${! this.contract }"
value: "${! this.answer }"
- label: mock_benthos_gauge_metric_no_label
metric:
type: gauge
name: mock_benthos_gauge_no_label
value: "${! this.answer }"
- label: mock_benthos_counter_metric
metric:
type: counter
name: mock_benthos_counter
labels:
contract: "${! this.contract }"
output:
label: "noop"
drop: {}
logger:
level: ${LOG_LEVEL:INFO}
format: logfmt
add_timestamp: true
timestamp_name: time
message_name: msg
static_fields:
'@service': test-benthos-pipeline