Skip to content

Commit d44a034

Browse files
author
Patrick Stephens
committed
packaging: switch to YAML config files for Linux packages by default
Signed-off-by: Patrick Stephens <[email protected]>
1 parent e9a2f87 commit d44a034

14 files changed

+115
-13
lines changed

conf/fluent-bit-macos.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
service:
2+
flush: 1
3+
log_level: info
4+
http_server: false
5+
http_listen: 0.0.0.0
6+
http_port: 2020
7+
parsers_file: parsers.yaml
8+
plugins_file: plugins.yaml
9+
10+
pipeline:
11+
inputs:
12+
- name: dummy
13+
tag: dummy.local
14+
15+
outputs:
16+
- name: stdout
17+
match: '*'

conf/fluent-bit-metrics.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
[OUTPUT]
2020
name prometheus_exporter
2121
match node_metrics
22-
listen 0.0.0.0
22+
host 0.0.0.0
2323
port 2021
2424
# Add user-defined labels
2525
# -----------------------

conf/fluent-bit-metrics.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
service:
2+
flush: 1
3+
log_level: info
4+
5+
pipeline:
6+
inputs:
7+
- name: node_exporter_metrics
8+
tag: node_metrics
9+
10+
outputs:
11+
- name: prometheus_exporter
12+
match: node_metrics
13+
host: 0.0.0.0
14+
port: 2021

conf/fluent-bit-win32.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
service:
2+
flush: 1
3+
log_level: info
4+
http_server: false
5+
http_listen: 0.0.0.0
6+
http_port: 2020
7+
parsers_file: parsers.yaml
8+
plugins_file: plugins.yaml
9+
10+
pipeline:
11+
inputs:
12+
- name: winlog
13+
channels: 'Setup,Windows PowerShell'
14+
15+
outputs:
16+
- name: stdout
17+
match: '*'

conf/fluent-bit.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
service:
2+
flush: 1
3+
log_level: info
4+
http_server: false
5+
http_listen: 0.0.0.0
6+
http_port: 2020
7+
parsers_file: parsers.yaml
8+
plugins_file: plugins.yaml
9+
10+
pipeline:
11+
inputs:
12+
- name: cpu
13+
tag: cpu.local
14+
15+
outputs:
16+
- name: stdout
17+
match: '*'

conf/parsers.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
parsers:
2+
- name: json
3+
format: json
4+
5+
- name: docker
6+
format: json
7+
time_key: time
8+
time_format: "%Y-%m-%dT%H:%M:%S.%L"
9+
time_keep: true

conf/plugins.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
plugins:
2+
# - /other/path/to/out_gstdout.so

cpack/debian/conffiles

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
/etc/fluent-bit/parsers.conf
22
/etc/fluent-bit/plugins.conf
33
/etc/fluent-bit/fluent-bit.conf
4+
/etc/fluent-bit/parsers.yaml
5+
/etc/fluent-bit/plugins.yaml
6+
/etc/fluent-bit/fluent-bit.yaml

cpack/macos/fluent-bit.plist.cmakein

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<array>
1111
<string>@CMAKE_INSTALL_FULL_BINDIR@/@FLB_OUT_NAME@</string>
1212
<string>--config</string>
13-
<string>@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_SYSCONFDIR@/@FLB_OUT_NAME@/@FLB_OUT_NAME@.conf</string>
13+
<string>@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_SYSCONFDIR@/@FLB_OUT_NAME@/@FLB_OUT_NAME@.yaml</string>
1414
</array>
1515
<key>RunAtLoad</key>
1616
<true/>

cpack/wix/WIX.template.in.cmakein

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
</SetProperty>
8484

8585
<Property Id="CreateFluentBitWinSvc" Value=" "/>
86-
<CustomAction Id="SetCreateFluentBitWinSvcCommand" Property="CreateFluentBitWinSvc" Value="&quot;sc.exe&quot; create @FLB_OUT_NAME@ binpath= &quot;\&quot;[INSTALL_ROOT]bin\@[email protected]\&quot; -c \&quot;[INSTALL_ROOT]conf\@FLB_OUT_NAME@.conf\&quot;&quot; start= delayed-auto" Execute="immediate" />
86+
<CustomAction Id="SetCreateFluentBitWinSvcCommand" Property="CreateFluentBitWinSvc" Value="&quot;sc.exe&quot; create @FLB_OUT_NAME@ binpath= &quot;\&quot;[INSTALL_ROOT]bin\@[email protected]\&quot; -c \&quot;[INSTALL_ROOT]conf\@FLB_OUT_NAME@.yaml\&quot;&quot; start= delayed-auto" Execute="immediate" />
8787
<CustomAction Id="CreateFluentBitWinSvc" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="ignore" Impersonate="no" />
8888

8989
<Property Id="LaunchFluentBitWinSvc" Value=" "/>

dockerfiles/Dockerfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,14 @@ RUN make -j "$(getconf _NPROCESSORS_ONLN)"
8484
RUN install bin/fluent-bit /fluent-bit/bin/
8585

8686
# Configuration files
87-
COPY conf/fluent-bit.conf \
88-
conf/parsers.conf \
89-
conf/parsers_ambassador.conf \
90-
conf/parsers_java.conf \
91-
conf/parsers_extra.conf \
92-
conf/parsers_openstack.conf \
93-
conf/parsers_cinder.conf \
94-
conf/plugins.conf \
87+
COPY conf/fluent-bit.* \
88+
conf/parsers.* \
89+
conf/parsers_ambassador.* \
90+
conf/parsers_java.* \
91+
conf/parsers_extra.* \
92+
conf/parsers_openstack.* \
93+
conf/parsers_cinder.* \
94+
conf/plugins.* \
9595
/fluent-bit/etc/
9696

9797
# Generate schema and include as part of the container image

init/systemd.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ After=network.target
88
Type=simple
99
EnvironmentFile=-/etc/sysconfig/@FLB_OUT_NAME@
1010
EnvironmentFile=-/etc/default/@FLB_OUT_NAME@
11-
ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/@FLB_OUT_NAME@ -c /@CMAKE_INSTALL_SYSCONFDIR@/@FLB_OUT_NAME@/@FLB_OUT_NAME@.conf
11+
ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/@FLB_OUT_NAME@ -c /@CMAKE_INSTALL_SYSCONFDIR@/@FLB_OUT_NAME@/@FLB_OUT_NAME@.yaml
1212
Restart=always
1313

1414
[Install]

snap/snapcraft.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ plugs:
1919

2020
apps:
2121
service:
22-
command: fluent-bit -c $SNAP/etc/fluent-bit/fluent-bit.conf
22+
command: fluent-bit -c $SNAP/etc/fluent-bit/fluent-bit.yaml
2323
daemon: simple
2424
plugs:
2525
- network

src/CMakeLists.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,28 +571,51 @@ if(FLB_BINARY)
571571
DESTINATION ${FLB_INSTALL_CONFDIR}
572572
COMPONENT binary
573573
RENAME "${FLB_OUT_NAME}.conf")
574+
install(FILES
575+
"${PROJECT_SOURCE_DIR}/conf/fluent-bit-win32.yaml"
576+
DESTINATION ${FLB_INSTALL_CONFDIR}
577+
COMPONENT binary
578+
RENAME "${FLB_OUT_NAME}.yaml")
574579
elseif(FLB_SYSTEM_MACOS)
575580
install(FILES
576581
"${PROJECT_SOURCE_DIR}/conf/fluent-bit-macos.conf"
577582
DESTINATION ${FLB_INSTALL_CONFDIR}
578583
COMPONENT binary
579584
RENAME "${FLB_OUT_NAME}.conf")
585+
install(FILES
586+
"${PROJECT_SOURCE_DIR}/conf/fluent-bit-macos.yaml"
587+
DESTINATION ${FLB_INSTALL_CONFDIR}
588+
COMPONENT binary
589+
RENAME "${FLB_OUT_NAME}.yaml")
580590
else()
581591
install(FILES
582592
"${PROJECT_SOURCE_DIR}/conf/fluent-bit.conf"
583593
DESTINATION ${FLB_INSTALL_CONFDIR}
584594
COMPONENT binary
585595
RENAME "${FLB_OUT_NAME}.conf")
596+
install(FILES
597+
"${PROJECT_SOURCE_DIR}/conf/fluent-bit.yaml"
598+
DESTINATION ${FLB_INSTALL_CONFDIR}
599+
COMPONENT binary
600+
RENAME "${FLB_OUT_NAME}.yaml")
586601
endif()
587602

588603
install(FILES
589604
"${PROJECT_SOURCE_DIR}/conf/parsers.conf"
590605
COMPONENT binary
591606
DESTINATION ${FLB_INSTALL_CONFDIR})
607+
install(FILES
608+
"${PROJECT_SOURCE_DIR}/conf/parsers.yaml"
609+
COMPONENT binary
610+
DESTINATION ${FLB_INSTALL_CONFDIR})
592611

593612
install(FILES
594613
"${PROJECT_SOURCE_DIR}/conf/plugins.conf"
595614
COMPONENT binary
596615
DESTINATION ${FLB_INSTALL_CONFDIR})
616+
install(FILES
617+
"${PROJECT_SOURCE_DIR}/conf/plugins.yaml"
618+
COMPONENT binary
619+
DESTINATION ${FLB_INSTALL_CONFDIR})
597620

598621
endif()

0 commit comments

Comments
 (0)