-
Notifications
You must be signed in to change notification settings - Fork 8
/
hotdog.yml
68 lines (59 loc) · 1.54 KB
/
hotdog.yml
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
# Example hotdog configuration
---
global:
listen:
address: '127.0.0.1'
port: 6514
tls:
cert: './contrib/cert.pem'
key: './contrib/cert-key.pem'
# Swap these values out in order to listen for plaintext syslog
#port: 1514
status:
address: '127.0.0.1'
port: 8585
kafka:
# Maximum number of messages to buffer internally while waiting for Kafka
# responses
buffer: 1024
conf:
bootstrap.servers: '127.0.0.1:9092'
# Default topic to log messages to that are not otherwise mapped
topic: 'test'
metrics:
statsd: 'localhost:8125'
rules:
- regex: '^hello\s+(?P<name>\w+)?'
# NOTE: field must currently be `msg`, applying rules on other fields is
# not yet supported
field: msg
actions:
- type: replace
template: |
This is the total message: {{msg}}
And the name is: {{name}}
- type: forward
topic: test
# We don't want any other rules to try to consume these messages
- type: stop
# Match JSON content which has a meta.topic value, e.g.
# {"meta":{"topic" : "foo"}}
- jmespath: 'meta.topic'
field: msg
actions:
- type: merge
json:
meta:
hotdog:
version: '{{version}}'
timestamp: '{{iso8601}}'
- type: forward
topic: '{{value}}'
- type: stop
# Catch-all, send everything else to a "logs-unknown" topic
- regex: '.*'
field: msg
actions:
- type: forward
topic: 'logs-unknown'
- type: stop