The Fluentd with Oracle example configuration
- Ruby 2.2.2+ (test with 2.4.1p111)
- Oracle Instant Client
- Client Package - Basic or Basic Lite
- Client Package - SDK
- Client Package - SQL*Plus
fluentdversion "~> 0.12.0"ruby-oci8version "~> 2.2.5"activerecord-oracle_enhanced-adapterversion "~> 1.8.2"fluent-plugin-sqlversion "~> 0.6.1"
The td-agent is not working with because it's embedded ruby 2.1 and activerecord-oracle_enhanced-adapter require ruby 2.2.2. We need to build ruby from source (or install ruby with dev package).
To build ruby from source just run following command:
$ yum -y install openssl openssl-devel gcc glibc-devel libgcc gdbm gdbm-devel readline readline-devel libffi libffi-devel zlib zlib-devel
$ wget https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.1.tar.gz
$ tar -xzvf ruby-2.4.1.tar.gz
$ cd ruby-2.4.1
$ ./configure && make && make installRedHat 6 not working with Oracle Instant client x86_64 which make ruby-oci8 to crush. So, we need to install 32-bit version for both Ruby and Oracle Instant client.
First allow 32-bit libraries to be installed. From RH KB 3628, edit /etc/yum.conf and insert a line in the main section:
multilib_policy=alland then build ruby using following command.
$ yum -y install openssl openssl-devel gcc glibc-devel libgcc gdbm gdbm-devel readline readline-devel libffi libffi-devel zlib zlib-devel
$ wget https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.1.tar.gz
$ tar -xzvf ruby-2.4.1.tar.gz
$ cd ruby-2.4.1
$ CFLAGS="-m32" LDFLAGS="-m32" CXXFLAGS="-m32" ./configure --target=i386-unknown-linux-gnu && make && make installBy default, this will install Ruby into /usr/local. To change, pass the --prefix=DIR option to the ./configure script. Use the following commands to check is ruby and gem was installed successfully:
$ ruby -v
$ gem -v
$ ruby -r mkmf -e ""To install Fluentd and plugin run the following command:
$ gem install fluentd -v "~> 0.12.0" --no-ri --no-rdoc
$ fluent-gem install ruby-oci8 -v "~> 2.2.5" --no-ri --no-rdoc
$ fluent-gem install activerecord-oracle_enhanced-adapter -v "~> 1.8.2" --no-ri --no-rdoc
$ fluent-gem install fluent-plugin-sql -v "~> 0.6.1" --no-ri --no-rdoc