A simple debian, side-car image for piping logs to Google Stackdriver
1.4K
A simple debian image with Google's Stackdriver monitoring agent (google-fluentd).
Enables custom log streaming to Google's Stackdriver logs using Fluentd config (https://docs.fluentd.org/v1.0/articles/config-file).
Start the container that contains the logs you want to stream, mounted on a named volume
docker run -v logsforstreaming:/path/to/your/logs your-image
Start a google-fluentd container which mounts your application's log directory
docker run \
-v logsforstreaming:/var/logs/custom:ro \
-v ./examples:/etc/google-fluentd/conf.d \
-e GOOGLE_APPLICATION_CREDENTIALS=/path/to/your/credentials.json \
triptease/google-fluentd
Custom log collection/filtering rules can be supplied in a your.conf file mounted to the container's /etc/google-fluentd/conf.d directory. For an example of this see the demo.conf in the /demo directory.
The main google-fluentd.conf file configures the Stackdriver logging output and is the default command for this image.
To specify a different google-fluentd.conf: `docker run triptease/google-fluentd google-fluentd --config=/path/to/your/google-fluentd.conf
GOOGLE_APPLICATION_CREDENTIALS (required) path to your service account credentials jsonDEBUG (optional) set this to stdout to print logs as well as sending to Stackdriver logs - defaults to nullBecuase Google's Stackdriver monitor agent relies on Google's internal metadata service it will only initialise on Google compute.
To workaround this you need to disable calls to the metadata servie and specify some extra paramaters to the google_cloud output in google-fluentd.conf:
<store>
@type google_cloud
...
# all other configuration parameters here
...
# Stuff to make it work locally...
use_metadata_service false
vm_id localhost
zone local
</store>
Content type
Image
Digest
Size
151 MB
Last updated
over 8 years ago
docker pull triptease/google-fluentd