name: John Doeage: 34country: Canada- Red- Green- Bluefilebeat: inputs: - type: log paths: - /var/log/*.log multiline: pattern: ‘^[‘ match: afterperson: {name: "John Doe", age: 34, country: "Canada"}colors: ["Red", "Green", "Blue"]output: elasticsearch: index: ‘beat-%{[beat.version]}-%{+yyyy.MM.dd}‘x
filebeat: inputs: - type: logenabled: truedisabled: falseinteger: 123negative: -1float: 5.4duration1: 2.5sduration2: 6hduration_disabled: -1sconstant-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}/registryes.host: ‘${ES_HOST:localhost}‘output.elasticsearch: hosts: [‘http://${es.host}:9200‘]namespace1: subnamespace: host: localhost sleep: 1snamespace2: subnamespace: host: localhost sleep: 1snamespace1: ${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: passwordoutput.console: pretty: true原文:https://www.cnblogs.com/lemon-le/p/10450731.html