Fluentd Logging

3 views
Skip to first unread message

Sanjay Kapoor

unread,
Oct 26, 2015, 4:36:38 PM10/26/15
to Containers at Google
Our app is configured with the fluent logger client to send json entries to the fluent daemon.  In development mode, we run local fluent daemons that simply log to files.  In the google container world, there already seems to be a fluent daemon available on every node.  What's the correct way to send these logs from our app:

1. configure our containers with FLUENTD_HOST (or use the service name) that sends the logs directly from our app to the google fluent daemon
2. run a separate service that runs fluentd and fluent-plugin-google-cloud that will forward data to the google fluent daemon
3. some other way


Sanjay Kapoor

unread,
Oct 26, 2015, 4:46:51 PM10/26/15
to Containers at Google
I should also specify that I'm looking for my json log output to show up in the google cloud logs interface

Sanjay Kapoor

unread,
Oct 29, 2015, 8:19:08 AM10/29/15
to Containers at Google
I chose to add a logging controller and service that runs fluentd and forwards all data.  This seems to work pretty well.

Christian Posta

unread,
Oct 29, 2015, 4:54:06 PM10/29/15
to Containers at Google
Can you just log to stdout and let the fluentd collector grab them from the docker containers?

Alex Robinson

unread,
Oct 30, 2015, 10:07:00 AM10/30/15
to Containers at Google
Just logging to stdout/stderr is indeed by far the simplest way to get logs to Google Cloud Logging. In Kubernetes 1.1 in a couple weeks, you'll even start getting a better breakdown of where the logs came from in the log viewer.

Is there any particular reason you don't want to log to stdout/stderr? Is it because your cluster wasn't set up with fluentd already on each node?
Reply all
Reply to author
Forward
0 new messages