works fine and docker fields gets added, but filebeat ignores docker files that are not generated by the docker engine.
Like with this configuration:
paths:
- /var/lib/docker/containers/*/*.log # these are harvested fine and docker data is added and sent to output
- /var/log/*.log # no data goes to output
- /var/log/messages # # no data goes to output
Shouldn't it be possible for filebeat to add docker meta data for the docker log files and harvest the other log files without adding the docker meta data, since there is none? I expected that both should be send to output, and only the docker log files should have the docker meta data.
I have tested this both with the config above and by using the system module, with its default config.
System module and the harvester by path /var/lib/docker/containers//.log, both works fine until I config the add_docker_metadata processor, which makes system module stop producing any data to output.
Common to both tests:
harvesting log files from /var/lib/docker/containers/*/*.log
system module enabled so that it collect logs from /var/log/message (among other things)
A docker container logs constantly in reasonable rate to file among /var/lib/docker/containers/*/*.log
Test 1
Setup
Docker meta data collected (enabled)
processors:
drop_fields=docker.container.image, docker.container.labels, prospector, offset, drop_fields=tags, stream, @version, fields}: key=tags: key not found, key=stream: key not found, key=@version: key not found, key=fields: key not found
Did you add a drop_fields processor? It looks like it's causing the issue
OK thanks. Just one more question.
Can I not use drop_fields together with add_docker_metadata at all, or can I use it if it hits fields that actually exists?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.