Skip to main content

Filebeat Configuration

The following is the configuration of the Filebeat. Update the configuration based on your environment:

  • path to Wildfly log files - path to Wildfly log files from which the data is collected, for example /opt/ejbca/wildfly/standalone/log/server.log*
  • tenant id - ID of your tenant, each tenant works as a separate logical unit, for example 63cb5adc87d8a76a
  • logstash hosts - list of logstash hosts where the messages should be sent, for example ["127.0.0.1:5140"]

Other configuration parameters can be adjusted, refer to Filebeat configuration.

filebeat.inputs:

- type: log
enabled: true
paths:
- path to Wildfly log files

include_lines: ['INFO(\s*)\[org\.ejbca','INFO(\s*)\[org\.cesecore','INFO(\s*)\[company\.threekey\.ejbca','DEBUG(\s*)\[org\.cesecore\.certificates\.ocsp\.logging']
#exclude_lines: ['DEBUG']

multiline.pattern: ^[[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2}
multiline.negate: true
multiline.match: after

processors:
- add_fields:
target: tenant
fields:
id: tenant id
- fingerprint:
fields: ["message"]
target_field: "@metadata._id"
encoding: base64

setup.ilm.enabled: false
setup.template.name: "dmr-ejbca-template"
setup.template.pattern: "dmr-ejbca-log*"

output.logstash:
hosts: logstash hosts

logging.metrics.enabled: false

logging.level: info
logging.to_files: true
logging.files:
path: /var/log/filebeat
name: filebeat
keepfiles: 7
permissions: 0644