LogSeverity on aggregated logs in Google Container Engine

434 views Asked by At

In a Google Container Engine cluster all of the standard out of the pods are aggregated and send to Google Cloud Logging. This works out fine except you don't have any control over the logging meta data like

google.logging.v1.LogSeverity

Is their a way to enrich the logging output on "standard out/err" so that the fluentd daemon on each cluster node recognizes the log severity on each log line.

But without changing something in the fluentd daemon on each node (that would defy the purpose of running as a service) or adding a custom fluentd daemon in each pod.

1

There are 1 answers

3
Alex Robinson On BEST ANSWER

Currently there's no way to do this with the default fluentd agents on each node. If you have suggestions on what the format(s) should be for a feature like this, we'd love your input! You can open an issue with your ideas here.

edit: Support for this was added as of Kubernetes version 1.1, which was released in Fall 2015. If you log a JSON payload with a "severity" field, that field's value will be used to populate cloud logging's severity field. You'll also probably want to populate the "message" field, which is assumed to contain the main body of the log message.