name: John Doe
age: 34
country: Canada
- Red
- Green
- Blue
filebeat:
inputs:
- type: log
paths:
- /var/log/*.log
multiline:
pattern: ‘^[‘
match: after
person: {name: "John Doe", age: 34, country: "Canada"}
colors: ["Red", "Green", "Blue"]
output:
elasticsearch:
index: ‘beat-%{[beat.version]}-%{+yyyy.MM.dd}‘
x
filebeat:
inputs:
- type: log
enabled: true
disabled: false
integer: 123
negative: -1
float: 5.4
duration1: 2.5s
duration2: 6h
duration_disabled: -1s
constant-format-string: ‘constant string‘
field-format-string: ‘%{[fieldname]} string‘
format-string-with-date: ‘%{[fieldname]}-%{+yyyy.MM.dd}‘
${VAR}
${VAR:default_value}
${VAR:?error_text}
ES_HOSTS="10.45.3.2:9220,10.45.3.1:9230"
output.elasticsearch:
hosts: ‘${ES_HOSTS}‘
filebeat.registry: ${path.data}/registry
es.host: ‘${ES_HOST:localhost}‘
output.elasticsearch:
hosts: [‘http://${es.host}:9200‘]
namespace1:
subnamespace:
host: localhost
sleep: 1s
namespace2:
subnamespace:
host: localhost
sleep: 1s
namespace1: ${shared}
namespace2: ${shared}
shared:
subnamespace:
host: localhost
sleep: 1s
output.elasticsearch:
hosts: ["http://localhost:9200"]
username: username
password: password
-E output=‘{elasticsearch.enabled: false, console.pretty: true}‘
output.elasticsearch:
enabled: false
hosts: ["http://localhost:9200"]
username: username
password: password
output.console:
pretty: true
原文:https://www.cnblogs.com/lemon-le/p/10450731.html