On Linux file systems, the configuration should be placed user
/etc/filebeat/filebeat.yml
Either you can use configuration wizard to create the configuration file or you can manually edit the configuration file. Always make sure that you have taken backup of original configuration file.
The file contains two main sections:
prospectors: define the files that needs to be monitored
outputs: responsible for sending the data in JSON format
Note 1:
There is a difference when configuring a prospector that harvests JSON files vs a prospector that harvests simple text line logs. Please follow the following guidelines.
When harvesting JSON files, please add cfxDLAio_codecequals to jsonto the fields object.
When harvesting text files, please add cfxDLAio_codecequals to plainto the fields object.
Note 2:
The fields_under_rootproperty should always set to be true.
Note 3:
The typeproperty should be defined, it is used to identify the type of log data and provide you with a richer logging experience. For complete list of known types, please click here. If the type you are looking for is not listed, please select the type that is closer or best describes your data.
The sample configuration file will look like the following:
You can add as many file entries as you like. All file entries should contain the cfxDLA token.