I have my application logger below:
{"@timestamp":"2019-11-12T16:05:05.407636Z","log":{"level":"INFO","logger":"audit"}
However when i run Filebeat in debug mode i notice that my keys are gone and replace with the file pointers:
2019-11-12T16:05:15.305+0100 DEBUG [processors] processing/processors.go:183 Publish event: {
"@timestamp": "2019-11-12T15:05:15.305Z",
"@metadata": {
"beat": "filebeat",
"type": "_doc",
"version": "7.4.2"
},
"log": {
"offset": 32778,
"file": {
"path": "/app/data/log/audit.log"
}
},
My filebeat config overall is pretty basic:
#=========================== Filebeat inputs =============================
filebeat.inputs:
- type: log
enable: true
paths:
- /app/data/log/**/*.log
json.keys_under_root: true
json.add_error_key: true
fields:
application: myapp
#================================ Processors =====================================
processors:
- add_host_metadata: ~
- add_cloud_metadata: ~
- timestamp:
field: '@timestamp'
timezone: CET
layouts:
- '2006-01-02T15:04:05Z'
- '2006-01-02T15:04:05.999Z'
test:
- '2019-06-22T16:33:51Z'
- '2019-11-18T04:59:51.123Z'