Google Cloud Logging plugin for fluentd
fluent-plugin-google-cloud gem includes two plugins:
-
A filter plugin for fluentd that embeds insertIds into log entries to guarantee order and uniqueness.
-
An output plugin for fluentd which sends logs to the Stackdriver Logging API.
This is an official Google Ruby gem.
<img src=“https://badge.fury.io/rb/fluent-plugin-google-cloud.svg” alt=“Gem Version” /> <img src=“https://secure.travis-ci.org/GoogleCloudPlatform/fluent-plugin-google-cloud.png” alt=“Build Status” />
Installation
This gem is hosted at RubyGems.org and can be installed using:
$ gem install fluent-plugin-google-cloud
Installing google-fluentd will also install and configure the gem.
Configuration
To embed insertIds into log entries, specify @type add_insert_ids
in a filter clause of your Fluentd configuration file, for example:
<filter **>
@type add_insert_ids
insert_id_key my_insert_id_field_name # Optional.
</filter>
insert_id_key can be used to customize the insertId field name.
To send logs to Google Cloud Logging, specify @type google_cloud
in a match clause of your Fluentd configuration file, for example:
<match **>
@type google_cloud
</match>
See detailed instructions on how to configure this output plugin here. The plugin uses Google Application Default Credentials for authorization - for additional information see here.
Copyright
- Copyright
-
Copyright 2014 Google Inc. All rights reserved.
- License
-
Apache License, Version 2.0