After working through issues with the new host object in Logstash errors after upgrading to filebeat-6.3.0 we've decided to go down the long road of namespacing our critical fields away from anything libbeat might put in the root in future.
However we've run in to an issue where nested fields with the same parent can't exist in both the main filebeat config and external prospector fragments.
E.g., using test_namespace
as the parent object:
/etc/filebeat/filebeat.yml
filebeat:
registry_file: /var/lib/filebeat/registry
config.prospectors:
enabled: true
path: /etc/filebeat/conf.d/*.yml
fields:
test_namespace.fqdn: civet.fqdn.xxxx
fields_under_root: true
output:
[...]
/etc/filebeat/conf.d/authlog.yml
- paths:
- /var/log/auth.log
type: log
fields:
test_namespace.container: syslog
fields_under_root: true
Output
{
"@timestamp": "2018-07-06T01:29:46.484Z",
"@metadata": {
"beat": "filebeat",
"type": "doc",
"version": "6.3.0"
},
"prospector": {
"type": "log"
},
"input": {
"type": "log"
},
"test_namespace": {
"container": "syslog"
},
"beat": {
"hostname": "civet",
"version": "6.3.0",
"name": "civet"
},
"host": {
"name": "civet"
},
"source": "/var/log/auth.log",
"offset": 67832,
"message": "[redacted]"
}
Note that test_namespace.fqdn
from filebeat.yml is missing from the output. If I rename the parent object in either of the configs, filebeat outputs both fields.
Is there any way to solve this, or is this a bug?