Skip to content

Commit

Permalink
out_oci_logan: plugin implementation
Browse files Browse the repository at this point in the history
Signed-off-by: adiforluls <[email protected]>
  • Loading branch information
adiforluls committed Aug 15, 2023
1 parent fb7d4c8 commit 33f099a
Show file tree
Hide file tree
Showing 8 changed files with 2,071 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ option(FLB_OUT_PROMETHEUS_REMOTE_WRITE "Enable Prometheus remote write plugin"
option(FLB_OUT_S3 "Enable AWS S3 output plugin" Yes)
option(FLB_OUT_VIVO_EXPORTER "Enabel Vivo exporter output plugin" Yes)
option(FLB_OUT_WEBSOCKET "Enable Websocket output plugin" Yes)
option(FLB_OUT_OCI_LOGAN "Enable OCI Logging analytics plugin" Yes)
option(FLB_FILTER_ALTER_SIZE "Enable alter_size filter" Yes)
option(FLB_FILTER_AWS "Enable aws filter" Yes)
option(FLB_FILTER_ECS "Enable AWS ECS filter" Yes)
Expand Down Expand Up @@ -959,7 +960,7 @@ if(FLB_BACKTRACE)
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) DESTDIR= install
)
add_library(libbacktrace STATIC IMPORTED GLOBAL)
add_library(libbacktrace STATIC IMPORTED GLOBAL plugins/out_oci_logan/oci_client.c plugins/out_oci_logan/oci_client.h)
set_target_properties(libbacktrace PROPERTIES IMPORTED_LOCATION "${CMAKE_CURRENT_BINARY_DIR}/backtrace-prefix/lib/libbacktrace.a")
add_dependencies(libbacktrace backtrace)
include_directories("${CMAKE_CURRENT_BINARY_DIR}/backtrace-prefix/include/")
Expand Down
65 changes: 65 additions & 0 deletions dockerfiles/Dockerfile.oracle
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
FROM ghcr.io/verrazzano/verrazzano-base-ol9:v1.0.0-20230627070315-744eefa as builder-base

RUN mkdir -p /fluent-bit/bin /fluent-bit/etc /fluent-bit/log

RUN microdnf -y module enable postgresql:15 \
&& microdnf --enablerepo=ol9_codeready_builder install -y \
cmake \
git \
make \
gcc \
gcc-c++ \
openssl openssl-devel \
cyrus-sasl-devel \
systemd-devel \
zlib-devel \
libpq-13.5-1.el9.x86_64 \
libpq-devel-13.5-1.el9.x86_64 \
libicu libicu-devel \
flex \
bison \
libyaml-devel \
postgresql postgresql-server \
&& microdnf clean all

WORKDIR /src/fluent-bit/
COPY . ./

FROM builder-base
WORKDIR /src/fluent-bit/build/
RUN cmake -DFLB_RELEASE=On \
-DFLB_JEMALLOC=On \
-DFLB_TLS=On \
-DFLB_SHARED_LIB=Off \
-DFLB_EXAMPLES=Off \
-DFLB_HTTP_SERVER=On \
-DFLB_IN_EXEC=Off \
-DFLB_IN_SYSTEMD=On \
-DFLB_OUT_KAFKA=On \
-DFLB_OUT_PGSQL=On \
-DFLB_JEMALLOC_OPTIONS="--with-lg-vaddr=48" \
-DFLB_LOG_NO_CONTROL_CHARS=On \
..

RUN make -j "$(getconf _NPROCESSORS_ONLN)"
RUN install bin/fluent-bit /fluent-bit/bin/

COPY conf/fluent-bit.conf \
conf/parsers.conf \
conf/parsers_ambassador.conf \
conf/parsers_java.conf \
conf/parsers_extra.conf \
conf/parsers_openstack.conf \
conf/parsers_cinder.conf \
conf/plugins.conf \
/fluent-bit/etc/

# Generate schema and include as part of the container image
RUN /fluent-bit/bin/fluent-bit -J > /fluent-bit/etc/schema.json


EXPOSE 2020

# Entry point
ENTRYPOINT [ "/fluent-bit/bin/fluent-bit" ]
CMD ["/fluent-bit/bin/fluent-bit", "-c", "/fluent-bit/etc/fluent-bit.conf"]
1 change: 1 addition & 0 deletions plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ REGISTER_OUT_PLUGIN("out_nats")
REGISTER_OUT_PLUGIN("out_nrlogs")
REGISTER_OUT_PLUGIN("out_null")
REGISTER_OUT_PLUGIN("out_opensearch")
REGISTER_OUT_PLUGIN("out_oci_logan")

if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
REGISTER_OUT_PLUGIN("out_plot")
Expand Down
6 changes: 6 additions & 0 deletions plugins/out_oci_logan/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
set(src
oci_logan.c
oci_logan_conf.c
)

FLB_PLUGIN(out_oci_logan "${src}" "")
Loading

0 comments on commit 33f099a

Please sign in to comment.