The current docker image ships with a default configuration file that filebeat uses and with auto-reloading disabled. When using this in practice most folks are going to need a custom configuration file. The completely turn the filebeat.full.yaml file into one that has environment variables that can be overriden for every option is not reasonable.
Rolling a custom docker image built-off the elastic one just for the purpose of overriding a configuration file is overkill.
To workaround this in Kubernetes I'm starting filebeat manually and passing it the location of files that I mounted in via a config map volume.
If anyone has a better suggestion on how to do this, it would be much appreciated. Another alternative is the default filebeat configuration file is removed from the image. This way everyone gets defaults but can mount in their own without needing to manually invoke the filebeat command.
Once that gets merged we should be able to mount a config map to configure the desired modules, while keeping default filebeat.yml untouched. Let me know what do you think about it.
Of course this would also require to have elasticsearch env variables in the config, but I think that's something we could do.
As for your setup, this is what I have been doing so far, not great, but it works fine
Well, it's somewhat unfortunate, but have you considered to enable auto-reloading from CLI by passing -E "filebeat.config.prospectors={reload.enabled:true, reload.period: 10s, path='/etc/filebeat.d/*.yml'}"?
Yes, but since that still requires overriding the CMD entrypoint from the docker image, I didn't see much benefit of it over the current approach. The goal is to avoid specifying a command entry with arguments. Unless I'm missing a benefit?
I thought one of the problems is also having to pass a customized filebeat.yml.
Passing/overwriting additional settings in filebeat.yml in the args section maybe does not require you to provide a customized filebeat.yml configuration. But there is no real benefit to it, especially if you already provide a customized filebeat.yml.
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.