Hi,
I am using filebeat version 7.17.3 running on Ubuntu 18.04.6 LTS to ship docker logs using filebeat installation on the host OS. I am not using a filebeat container.
I noticed a couple of things that I would like to remediate and I couldn't find an answer for in the documentation.
My .yml file is
While the logs are shipped to Kibana, they are not readable as they include the terminal color codes like “ [1;34mbin[m [1;34mctmp[m [1;34mdev[m [1;34metc[m [1;34mhome[m [1;34mlib[m [1;34mmedia[m [1;34mmnt[m [1;34mopt[m [1;34mproc[m [1;34mroot[m [1;34mrun[m [1;34msbin[m [1;34msrv[m [1;34msys[m [1;34mtmp[m [1;34musr[m [1;34mvar[m” is what I see when I run ls -la inside a container.
How can I only show the text?
I also don't see any logs regarding to containers starting or stopping. Is this an expected behaviour?
Indeed this is the actual content of the log entry, you either have to disable coloured output in the docker container, or add a script processor (Script Processor | Filebeat Reference [7.17] | Elastic) in order to strip the control chars
Hi Andrea,
Is this the only option I have to sanitize the logs even though I am using the official provider?
Any idea why I only see logs if I exec inside a container? or How to reduce the number of documents added to our index. For example, 24 records get added if I do ls -la inside a container because filebeat sends every line as its own record.
I managed to remove the ascii characters and cleanup the kibana entries using the processor script. In case anyone else has the same issue. the solution is
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.