I am able to injest logs to Google Log Viewer with the help of stackdriver logging agent from Container Optimized OS as JSON.
It injests logs as a value to message, but not as json payload with the default configuration
What I have tried?
I have changed the fluentd config in /etc/stackdriver/logging.config.d/fluentd-lakitu.conf to the following:
<source> @type tail format json path /var/lib/docker/containers/*/*.log <parse> @type json </parse> pos_file /var/log/google-fluentd/containers.log.pos tag reform_contain read_from_head true </source>
But its unable to send logs to Log viewer
OS: Container Optimized OS cos-81-12871-1196-0
Source: Docker Questions