2020-04-04 21:28:25 +00:00
|
|
|
# Example hotdog configuration
|
|
|
|
---
|
|
|
|
global:
|
|
|
|
listen:
|
|
|
|
address: '127.0.0.1'
|
2020-04-18 22:01:42 +00:00
|
|
|
port: 6514
|
|
|
|
tls:
|
|
|
|
cert: './contrib/cert.pem'
|
|
|
|
key: './contrib/cert-key.pem'
|
2020-04-19 20:34:01 +00:00
|
|
|
# Swap these values out in order to listen for plaintext syslog
|
2020-04-18 22:32:39 +00:00
|
|
|
#port: 1514
|
2020-05-25 21:24:17 +00:00
|
|
|
status:
|
|
|
|
address: '127.0.0.1'
|
|
|
|
port: 8585
|
2020-04-04 23:17:48 +00:00
|
|
|
kafka:
|
2020-05-06 19:41:50 +00:00
|
|
|
# Maximum number of messages to buffer internally while waiting for Kafka
|
|
|
|
# responses
|
|
|
|
buffer: 1024
|
2020-04-20 02:22:21 +00:00
|
|
|
conf:
|
|
|
|
bootstrap.servers: '127.0.0.1:9092'
|
2020-04-04 23:17:48 +00:00
|
|
|
# Default topic to log messages to that are not otherwise mapped
|
|
|
|
topic: 'test'
|
2020-04-05 21:21:36 +00:00
|
|
|
metrics:
|
|
|
|
statsd: 'localhost:8125'
|
2020-04-04 21:28:25 +00:00
|
|
|
|
|
|
|
rules:
|
2020-04-05 06:50:36 +00:00
|
|
|
- regex: '^hello\s+(?P<name>\w+)?'
|
2020-04-20 03:03:50 +00:00
|
|
|
# NOTE: field must currently be `msg`, applying rules on other fields is
|
|
|
|
# not yet supported
|
2020-04-05 06:50:36 +00:00
|
|
|
field: msg
|
|
|
|
actions:
|
|
|
|
- type: replace
|
|
|
|
template: |
|
|
|
|
This is the total message: {{msg}}
|
|
|
|
|
|
|
|
And the name is: {{name}}
|
|
|
|
|
|
|
|
- type: forward
|
|
|
|
topic: test
|
2020-04-05 21:22:13 +00:00
|
|
|
|
|
|
|
# We don't want any other rules to try to consume these messages
|
|
|
|
- type: stop
|
2020-04-05 22:19:58 +00:00
|
|
|
|
2020-05-16 15:54:08 +00:00
|
|
|
# Match JSON content which has a meta.topic value, e.g.
|
|
|
|
# {"meta":{"topic" : "foo"}}
|
2020-04-07 04:56:52 +00:00
|
|
|
- jmespath: 'meta.topic'
|
2020-04-05 22:19:58 +00:00
|
|
|
field: msg
|
|
|
|
actions:
|
2020-04-06 00:07:43 +00:00
|
|
|
- type: merge
|
|
|
|
json:
|
|
|
|
meta:
|
|
|
|
hotdog:
|
|
|
|
version: '{{version}}'
|
|
|
|
timestamp: '{{iso8601}}'
|
|
|
|
|
|
|
|
- type: forward
|
2020-04-15 20:04:53 +00:00
|
|
|
topic: '{{value}}'
|
2020-04-06 00:07:43 +00:00
|
|
|
|
2020-04-05 22:19:58 +00:00
|
|
|
- type: stop
|
2020-04-06 00:07:43 +00:00
|
|
|
|
|
|
|
# Catch-all, send everything else to a "logs-unknown" topic
|
|
|
|
- regex: '.*'
|
|
|
|
field: msg
|
|
|
|
actions:
|
|
|
|
- type: forward
|
|
|
|
topic: 'logs-unknown'
|
2020-04-15 20:04:53 +00:00
|
|
|
|
|
|
|
- type: stop
|