Kernel logging to Cloud Logging for Container Engine nodes?

12/7/2015

My container logs for Container Engine all show up nice and pretty and divided by application in Cloud Logging, but conspicuously absent are kernel messages. How can I log kernel messages from my bare-metal Container Engine node to Cloud Logging?

-- joshk0
google-cloud-logging
google-kubernetes-engine

1 Answer

12/8/2015

The fluentd config for the GCP logging agent on GKE is in google-fluentd.conf. It does not currently include /var/log/kern.log as a log source.

I've opened Issue #18387 to track that as a potential feature.

Until then, you could either add /var/log/kern.log to the fluentd config file running inside the fluentd container on each of your nodes, or run a separate GCP logging agent just for kernel logs on each node. Both of these have the downside that they would not survive node failures or cluster scaling, and you'd need to manually update.

-- CJ Cullen
Source: StackOverflow