-
Notifications
You must be signed in to change notification settings - Fork 1
/
filebeat.yml
43 lines (37 loc) · 1.52 KB
/
filebeat.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
# filebeat options: https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-reference-yml.html
filebeat.inputs:
- type: log
enabled: true
# https://www.elastic.co/guide/en/beats/filebeat/current/multiline-examples.html
# This regexp describes the begin of log row (for example, '2019.10.23 21:13:51.384500 [ 322 ] ..').
multiline.pattern: '^\d{4}.\d{1,2}.\d{1,2}'
multiline.negate: true
multiline.match: after
paths:
- /var/log/clickhouse-server/clickhouse-server.err.log
# https://www.elastic.co/guide/en/beats/filebeat/current/defining-processors.html
processors:
# https://www.elastic.co/guide/en/beats/filebeat/current/drop-fields.html
- drop_fields:
# Prevent fail of Logstash (https://www.elastic.co/guide/en/beats/libbeat/current/breaking-changes-6.3.html#custom-template-non-versioned-indices)
fields: ["host"]
# https://www.elastic.co/guide/en/beats/filebeat/current/dissect.html
- dissect:
# tokenizer syntax: https://www.elastic.co/guide/en/logstash/current/plugins-filters-dissect.html.
tokenizer: "%{timestamp} [%{threadId}] {%{}} <%{level}> %{title}"
field: "message"
target_prefix: ""
fields:
application: clickhouse
fields_under_root: true
output.logstash:
hosts: ["11.22.33.44"]
# https://www.elastic.co/guide/en/beats/filebeat/current/configuration-logging.html
# show log: tail /var/log/filebeat/filebeat -n 10
logging.level: info
logging.to_files: true
logging.files:
path: /var/log/filebeat
name: filebeat
keepfiles: 3
permissions: 0644