From f0ff6fc7acfc4e7038e0c9872aa1f0285c182f9e Mon Sep 17 00:00:00 2001 From: Eduardo Silva Date: Mon, 10 Dec 2018 10:59:24 -0800 Subject: [PATCH] Release (dev): v1.0-next Signed-off-by: Eduardo Silva --- 1.0/Dockerfile | 81 +++++++++++++++++++++++++++++ 1.0/fluent-bit.conf | 48 ++++++++++++++++++ 1.0/parsers.conf | 101 +++++++++++++++++++++++++++++++++++++ 1.0/parsers.conf.save | 92 +++++++++++++++++++++++++++++++++ 1.0/parsers_cinder.conf | 10 ++++ 1.0/parsers_extra.conf | 78 ++++++++++++++++++++++++++++ 1.0/parsers_java.conf | 6 +++ 1.0/parsers_mult.conf | 26 ++++++++++ 1.0/parsers_openstack.conf | 53 +++++++++++++++++++ 1.0/plugins.conf | 2 + 10 files changed, 497 insertions(+) create mode 100644 1.0/Dockerfile create mode 100644 1.0/fluent-bit.conf create mode 100644 1.0/parsers.conf create mode 100644 1.0/parsers.conf.save create mode 100644 1.0/parsers_cinder.conf create mode 100644 1.0/parsers_extra.conf create mode 100644 1.0/parsers_java.conf create mode 100644 1.0/parsers_mult.conf create mode 100644 1.0/parsers_openstack.conf create mode 100644 1.0/plugins.conf diff --git a/1.0/Dockerfile b/1.0/Dockerfile new file mode 100644 index 0000000..c64314d --- /dev/null +++ b/1.0/Dockerfile @@ -0,0 +1,81 @@ +FROM debian:stretch as builder + +# Fluent Bit version +ENV FLB_MAJOR 1 +ENV FLB_MINOR 0 +ENV FLB_PATCH 0 +ENV FLB_VERSION 1.0.0 + +ENV DEBIAN_FRONTEND noninteractive + +ENV FLB_TARBALL https://github.com/fluent/fluent-bit/archive/master.zip +RUN mkdir -p /fluent-bit/bin /fluent-bit/etc /fluent-bit/log /tmp/fluent-bit-master/ + +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + build-essential \ + cmake \ + make \ + wget \ + unzip \ + libssl1.0-dev \ + libasl-dev \ + libsasl2-dev \ + pkg-config \ + libsystemd-dev \ + zlib1g-dev \ + ca-certificates \ + && wget -O "/tmp/fluent-bit-master.zip" ${FLB_TARBALL} \ + && cd /tmp && unzip "fluent-bit-master.zip" \ + && cd "fluent-bit-master"/build/ \ + && rm -rf /tmp/fluent-bit-master/build/* + +WORKDIR /tmp/fluent-bit-master/build/ +RUN cmake -DFLB_DEBUG=On \ + -DFLB_TRACE=Off \ + -DFLB_JEMALLOC=On \ + -DFLB_TLS=On \ + -DFLB_SHARED_LIB=Off \ + -DFLB_EXAMPLES=Off \ + -DFLB_HTTP_SERVER=On \ + -DFLB_IN_SYSTEMD=On \ + -DFLB_OUT_KAFKA=On .. + +RUN make -j $(getconf _NPROCESSORS_ONLN) +RUN install bin/fluent-bit /fluent-bit/bin/ + +# Configuration files +COPY fluent-bit.conf \ + parsers.conf \ + parsers_java.conf \ + parsers_extra.conf \ + parsers_openstack.conf \ + parsers_cinder.conf \ + plugins.conf \ + /fluent-bit/etc/ + +FROM gcr.io/distroless/cc +MAINTAINER Eduardo Silva +LABEL Description="Fluent Bit docker image" Vendor="Fluent Organization" Version="1.1" + +COPY --from=builder /usr/lib/x86_64-linux-gnu/*sasl* /usr/lib/x86_64-linux-gnu/ +COPY --from=builder /usr/lib/x86_64-linux-gnu/libz* /usr/lib/x86_64-linux-gnu/ +COPY --from=builder /lib/x86_64-linux-gnu/libz* /lib/x86_64-linux-gnu/ +COPY --from=builder /usr/lib/x86_64-linux-gnu/libssl.so* /usr/lib/x86_64-linux-gnu/ +COPY --from=builder /usr/lib/x86_64-linux-gnu/libcrypto.so* /usr/lib/x86_64-linux-gnu/ +# These below are all needed for systemd +COPY --from=builder /lib/x86_64-linux-gnu/libsystemd* /lib/x86_64-linux-gnu/ +COPY --from=builder /lib/x86_64-linux-gnu/libselinux.so* /lib/x86_64-linux-gnu/ +COPY --from=builder /lib/x86_64-linux-gnu/liblzma.so* /lib/x86_64-linux-gnu/ +COPY --from=builder /usr/lib/x86_64-linux-gnu/liblz4.so* /usr/lib/x86_64-linux-gnu/ +COPY --from=builder /lib/x86_64-linux-gnu/libgcrypt.so* /lib/x86_64-linux-gnu/ +COPY --from=builder /lib/x86_64-linux-gnu/libpcre.so* /lib/x86_64-linux-gnu/ +COPY --from=builder /lib/x86_64-linux-gnu/libgpg-error.so* /lib/x86_64-linux-gnu/ + +COPY --from=builder /fluent-bit /fluent-bit + +# +EXPOSE 2020 + +# Entry point +CMD ["/fluent-bit/bin/fluent-bit", "-c", "/fluent-bit/etc/fluent-bit.conf"] diff --git a/1.0/fluent-bit.conf b/1.0/fluent-bit.conf new file mode 100644 index 0000000..00aff07 --- /dev/null +++ b/1.0/fluent-bit.conf @@ -0,0 +1,48 @@ +[SERVICE] + # Flush + # ===== + # Set an interval of seconds before to flush records to a destination + Flush 5 + + # Daemon + # ====== + # Instruct Fluent Bit to run in foreground or background mode. + Daemon Off + + # Log_Level + # ========= + # Set the verbosity level of the service, values can be: + # + # - error + # - warning + # - info + # - debug + # - trace + # + # By default 'info' is set, that means it includes 'error' and 'warning'. + Log_Level info + + # Parsers_File + # ============ + # Specify an optional 'Parsers' configuration file + Parsers_File parsers.conf + Plugins_File plugins.conf + + # HTTP Server + # =========== + # Enable/Disable the built-in HTTP Server for metrics + HTTP_Server Off + HTTP_Listen 0.0.0.0 + HTTP_Port 2020 + +[INPUT] + Name cpu + Tag cpu.local + # Interval Sec + # ==== + # Read interval (sec) Default: 1 + Interval_Sec 1 + +[OUTPUT] + Name stdout + Match * diff --git a/1.0/parsers.conf b/1.0/parsers.conf new file mode 100644 index 0000000..d56d6bc --- /dev/null +++ b/1.0/parsers.conf @@ -0,0 +1,101 @@ +[PARSER] + Name apache + Format regex + Regex ^(?[^ ]*) [^ ]* (?[^ ]*) \[(?