diff --git a/conf/fluent-bit-macos.yaml b/conf/fluent-bit-macos.yaml new file mode 100644 index 00000000000..28369f49bf6 --- /dev/null +++ b/conf/fluent-bit-macos.yaml @@ -0,0 +1,17 @@ +service: + flush: 1 + log_level: info + http_server: false + http_listen: 0.0.0.0 + http_port: 2020 + parsers_file: parsers.yaml + plugins_file: plugins.yaml + +pipeline: + inputs: + - name: dummy + tag: dummy.local + + outputs: + - name: stdout + match: '*' diff --git a/conf/fluent-bit-metrics.conf b/conf/fluent-bit-metrics.conf index 988e0dcbb89..ebabb21481a 100644 --- a/conf/fluent-bit-metrics.conf +++ b/conf/fluent-bit-metrics.conf @@ -19,7 +19,7 @@ [OUTPUT] name prometheus_exporter match node_metrics - listen 0.0.0.0 + host 0.0.0.0 port 2021 # Add user-defined labels # ----------------------- diff --git a/conf/fluent-bit-metrics.yaml b/conf/fluent-bit-metrics.yaml new file mode 100644 index 00000000000..a5f0fb21089 --- /dev/null +++ b/conf/fluent-bit-metrics.yaml @@ -0,0 +1,14 @@ +service: + flush: 1 + log_level: info + +pipeline: + inputs: + - name: node_exporter_metrics + tag: node_metrics + + outputs: + - name: prometheus_exporter + match: node_metrics + host: 0.0.0.0 + port: 2021 diff --git a/conf/fluent-bit-win32.yaml b/conf/fluent-bit-win32.yaml new file mode 100644 index 00000000000..4ea9b905161 --- /dev/null +++ b/conf/fluent-bit-win32.yaml @@ -0,0 +1,17 @@ +service: + flush: 1 + log_level: info + http_server: false + http_listen: 0.0.0.0 + http_port: 2020 + parsers_file: parsers.yaml + plugins_file: plugins.yaml + +pipeline: + inputs: + - name: winlog + channels: 'Setup,Windows PowerShell' + + outputs: + - name: stdout + match: '*' \ No newline at end of file diff --git a/conf/fluent-bit.yaml b/conf/fluent-bit.yaml new file mode 100644 index 00000000000..641fafa7878 --- /dev/null +++ b/conf/fluent-bit.yaml @@ -0,0 +1,17 @@ +service: + flush: 1 + log_level: info + http_server: false + http_listen: 0.0.0.0 + http_port: 2020 + parsers_file: parsers.yaml + plugins_file: plugins.yaml + +pipeline: + inputs: + - name: cpu + tag: cpu.local + + outputs: + - name: stdout + match: '*' diff --git a/conf/parsers.yaml b/conf/parsers.yaml new file mode 100644 index 00000000000..f93c06de23a --- /dev/null +++ b/conf/parsers.yaml @@ -0,0 +1,9 @@ +parsers: + - name: json + format: json + + - name: docker + format: json + time_key: time + time_format: "%Y-%m-%dT%H:%M:%S.%L" + time_keep: true diff --git a/conf/plugins.yaml b/conf/plugins.yaml new file mode 100644 index 00000000000..98c1b56f601 --- /dev/null +++ b/conf/plugins.yaml @@ -0,0 +1,2 @@ +plugins: +# - /other/path/to/out_gstdout.so \ No newline at end of file diff --git a/cpack/debian/conffiles b/cpack/debian/conffiles index 897702fc325..36183465b28 100644 --- a/cpack/debian/conffiles +++ b/cpack/debian/conffiles @@ -1,3 +1,6 @@ /etc/fluent-bit/parsers.conf /etc/fluent-bit/plugins.conf /etc/fluent-bit/fluent-bit.conf +/etc/fluent-bit/parsers.yaml +/etc/fluent-bit/plugins.yaml +/etc/fluent-bit/fluent-bit.yaml diff --git a/cpack/macos/fluent-bit.plist.cmakein b/cpack/macos/fluent-bit.plist.cmakein index 70d2b6baa87..e95559b857a 100644 --- a/cpack/macos/fluent-bit.plist.cmakein +++ b/cpack/macos/fluent-bit.plist.cmakein @@ -10,7 +10,7 @@ @CMAKE_INSTALL_FULL_BINDIR@/@FLB_OUT_NAME@ --config - @CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_SYSCONFDIR@/@FLB_OUT_NAME@/@FLB_OUT_NAME@.conf + @CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_SYSCONFDIR@/@FLB_OUT_NAME@/@FLB_OUT_NAME@.yaml RunAtLoad diff --git a/cpack/wix/WIX.template.in.cmakein b/cpack/wix/WIX.template.in.cmakein index 2f839408878..4fb4c261d1f 100644 --- a/cpack/wix/WIX.template.in.cmakein +++ b/cpack/wix/WIX.template.in.cmakein @@ -83,7 +83,7 @@ - + diff --git a/dockerfiles/Dockerfile b/dockerfiles/Dockerfile index 7cdcfe6bc88..25aa97157e6 100644 --- a/dockerfiles/Dockerfile +++ b/dockerfiles/Dockerfile @@ -84,14 +84,14 @@ RUN make -j "$(getconf _NPROCESSORS_ONLN)" RUN install bin/fluent-bit /fluent-bit/bin/ # Configuration files -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 \ +COPY conf/fluent-bit.* \ + conf/parsers.* \ + conf/parsers_ambassador.* \ + conf/parsers_java.* \ + conf/parsers_extra.* \ + conf/parsers_openstack.* \ + conf/parsers_cinder.* \ + conf/plugins.* \ /fluent-bit/etc/ # Generate schema and include as part of the container image diff --git a/init/systemd.in b/init/systemd.in index 8838bc5cec6..6707361f0bb 100644 --- a/init/systemd.in +++ b/init/systemd.in @@ -8,7 +8,7 @@ After=network.target Type=simple EnvironmentFile=-/etc/sysconfig/@FLB_OUT_NAME@ EnvironmentFile=-/etc/default/@FLB_OUT_NAME@ -ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/@FLB_OUT_NAME@ -c /@CMAKE_INSTALL_SYSCONFDIR@/@FLB_OUT_NAME@/@FLB_OUT_NAME@.conf +ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/@FLB_OUT_NAME@ -c /@CMAKE_INSTALL_SYSCONFDIR@/@FLB_OUT_NAME@/@FLB_OUT_NAME@.yaml Restart=always [Install] diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 178efd1ca8f..ecf1e7c1609 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -19,7 +19,7 @@ plugs: apps: service: - command: fluent-bit -c $SNAP/etc/fluent-bit/fluent-bit.conf + command: fluent-bit -c $SNAP/etc/fluent-bit/fluent-bit.yaml daemon: simple plugs: - network diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8a790166680..ba70b8e109b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -571,28 +571,51 @@ if(FLB_BINARY) DESTINATION ${FLB_INSTALL_CONFDIR} COMPONENT binary RENAME "${FLB_OUT_NAME}.conf") + install(FILES + "${PROJECT_SOURCE_DIR}/conf/fluent-bit-win32.yaml" + DESTINATION ${FLB_INSTALL_CONFDIR} + COMPONENT binary + RENAME "${FLB_OUT_NAME}.yaml") elseif(FLB_SYSTEM_MACOS) install(FILES "${PROJECT_SOURCE_DIR}/conf/fluent-bit-macos.conf" DESTINATION ${FLB_INSTALL_CONFDIR} COMPONENT binary RENAME "${FLB_OUT_NAME}.conf") + install(FILES + "${PROJECT_SOURCE_DIR}/conf/fluent-bit-macos.yaml" + DESTINATION ${FLB_INSTALL_CONFDIR} + COMPONENT binary + RENAME "${FLB_OUT_NAME}.yaml") else() install(FILES "${PROJECT_SOURCE_DIR}/conf/fluent-bit.conf" DESTINATION ${FLB_INSTALL_CONFDIR} COMPONENT binary RENAME "${FLB_OUT_NAME}.conf") + install(FILES + "${PROJECT_SOURCE_DIR}/conf/fluent-bit.yaml" + DESTINATION ${FLB_INSTALL_CONFDIR} + COMPONENT binary + RENAME "${FLB_OUT_NAME}.yaml") endif() install(FILES "${PROJECT_SOURCE_DIR}/conf/parsers.conf" COMPONENT binary DESTINATION ${FLB_INSTALL_CONFDIR}) + install(FILES + "${PROJECT_SOURCE_DIR}/conf/parsers.yaml" + COMPONENT binary + DESTINATION ${FLB_INSTALL_CONFDIR}) install(FILES "${PROJECT_SOURCE_DIR}/conf/plugins.conf" COMPONENT binary DESTINATION ${FLB_INSTALL_CONFDIR}) + install(FILES + "${PROJECT_SOURCE_DIR}/conf/plugins.yaml" + COMPONENT binary + DESTINATION ${FLB_INSTALL_CONFDIR}) endif()