Oracle Cloud Infrastructure Fluentd Plugin
This is the official fluentd plugin for the Oracle Cloud Infrastructure (OCI) Logging service. This project is open source, in active development and maintained by Oracle.
Requirements
To use this fluentd plugin, you must have:
- An Oracle Cloud Infrastructure acount.
- A user created in that account, in a group with a policy that grants the desired permissions. This can be a user for yourself, or another person/system that needs to call the API. For an example of how to set up a new user, group, compartment, and policy, see Adding Users in the Getting Started Guide. For a list of typical policies you may want to use, see Common Policies in the User Guide.
- Ruby version 2.2 or later running on Mac, Linux or Windows.
Installation
Add this line to your application's Gemfile:
gem 'fluent-plugin-oci-logging'
And then execute:
$ bundle
Or install it yourself as:
gem install fluent-plugin-oci-logging
Besides the plugin, the above commands will also automatically install fluentd, as well as the rest of the required ruby dependencies, in your system.
Configuration
For usage with instance principals:
<source>
@type dummy
tag test
dummy {"test":"message"}
</source>
<match **>
@type oci_logging
log_object_id ocid1.log.oc1.XXX.xxx
</match>
For usage with an API signing key:
<source>
@type dummy
tag test
dummy {"test":"message"}
</source>
<match **>
@type oci_logging
principal_override user
log_object_id ocid1.log.oc1.XXX.xxx
</match>
To authenticate as a particular user, you need to generate an API Signing Key for that user.
Logging Setup
Detailed instructions, alongside examples, on how you can setup your logging environment can be found in the official OCI docs. Also, to find out how to search your logs, you can check the documentation for log search.
Documentation
Full documentation, including prerequisites, installation, and configuration instructions can be found here.
API reference can be found here.
This documentation can be found installed in your system in the gem specific directory. You can find its exact location by running the command:
gem contents fluent-plugin-oci-logging
Alternatively, you can also view it via ruby's documentation tool ri
with the following command:
ri -f markdown fluent-plugin-oci-logging:README
Finally, you can view it by extracting the gem contents (the gem file itself is a tar archive).
Known Issues
You can find information on any known issues with the SDK under the Issues tab.
Questions or Feedback?
Please open an issue for any problems or questions you may have.
Addtional ways to get in touch:
- Stack Overflow: Please use the oracle-cloud-infrastructure and oci-ruby-sdk tags in your post
- Developer Tools section of the Oracle Cloud forums
- My Oracle Support
Contributing
This project welcomes contributions from the community. Before submitting a pull request, please review our contribution guide.
Security
Please consult the security guide for our responsible security vulnerability disclosure process.
License
Copyright (c) 2021, Oracle and/or its affiliates.
This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
See LICENSE for more details.