You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: installation/sources/build-with-static-configuration.md
+43-21Lines changed: 43 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,36 @@
1
-
# Build with Static Configuration
1
+
# Build with static configuration
2
2
3
-
[Fluent Bit](https://fluentbit.io) in normal operation mode allows to be configurable through [text files](https://github.com/fluent/fluent-bit-docs/tree/8ab2f4cda8dfdd8def7fa0cf5c7ffc23069e5a70/installation/configuration/file.md) or using specific arguments in the command line, while this is the ideal deployment case, there are scenarios where a more restricted configuration is required: static configuration mode.
3
+
[Fluent Bit](https://fluentbit.io) in normal operation mode is configurable through
4
+
[text files](/installation/configuration/file.md)
5
+
or using specific arguments in the command line. Although this is the ideal deployment
6
+
case, there are scenarios where a more restricted configuration is required. Static
Static configuration mode aims to include a built-in configuration in the final binary of Fluent Bit, disabling the usage of external files or flags at runtime.
9
+
Static configuration mode includes a built-in configuration in the final binary of
10
+
Fluent Bit, disabling the usage of external files or flags at runtime.
6
11
7
-
## Getting Started
12
+
## Get started
8
13
9
14
### Requirements
10
15
11
-
The following steps assumes you are familiar with configuring Fluent Bit using text files and you have experience building it from scratch as described in the [Build and Install](https://github.com/fluent/fluent-bit-docs/tree/8ab2f4cda8dfdd8def7fa0cf5c7ffc23069e5a70/installation/sources/build_install.md) section.
16
+
The following steps assume you are familiar with configuring Fluent Bit using text
17
+
files and you have experience building it from scratch as described in
18
+
[Build and Install](build-and-install.md).
12
19
13
20
#### Configuration Directory
14
21
15
-
In your file system prepare a specific directory that will be used as an entry point for the build system to lookup and parse the configuration files. It is mandatory that this directory contain as a minimum one configuration file called _fluent-bit.conf_ containing the required [SERVICE](https://github.com/fluent/fluent-bit-docs/tree/8ab2f4cda8dfdd8def7fa0cf5c7ffc23069e5a70/installation/configuration/file.md#config_section), [INPUT](https://github.com/fluent/fluent-bit-docs/tree/8ab2f4cda8dfdd8def7fa0cf5c7ffc23069e5a70/installation/sources/configuration/file.md#config_input) and [OUTPUT](https://github.com/fluent/fluent-bit-docs/tree/8ab2f4cda8dfdd8def7fa0cf5c7ffc23069e5a70/installation/configuration/file.md#config_output) sections. As an example create a new _fluent-bit.conf_ file with the following content:
22
+
In your file system, prepare a specific directory that will be used as an entry
23
+
point for the build system to lookup and parse the configuration files. This
24
+
directory must contain a minimum of one configuration file called
[INPUT](/concepts/data-pipeline/input.md), and [OUTPUT](/concepts/data-pipeline/output.md)
28
+
sections.
16
29
17
-
```python
30
+
As an example, create a new `fluent-bit.conf` file with the following
31
+
content:
32
+
33
+
```python copy
18
34
[SERVICE]
19
35
Flush 1
20
36
Daemon off
@@ -28,31 +44,37 @@ In your file system prepare a specific directory that will be used as an entry p
28
44
Match *
29
45
```
30
46
31
-
the configuration provided above will calculate CPU metrics from the running system and print them to the standard output interface.
47
+
This configuration calculates CPU metrics from the running system and prints them
48
+
to the standard output interface.
32
49
33
-
#### Build with Custom Configuration
50
+
#### Build with custom configuration
34
51
35
-
Inside Fluent Bit source code, get into the build/ directory and run CMake appending the FLB\_STATIC\_CONF option pointing the configuration directory recently created, e.g:
52
+
1. Go to the Fluent Bit source codebuild directory:
36
53
37
-
```bash
38
-
$ cd fluent-bit/build/
39
-
$ cmake -DFLB_STATIC_CONF=/path/to/my/confdir/
40
-
```
54
+
```bash copy
55
+
cd fluent-bit/build/
56
+
```
41
57
42
-
then build it:
58
+
1. Run CMake, appending the `FLB_STATIC_CONF` option pointing to
59
+
the configuration directory recently created:
43
60
44
-
```bash
45
-
$ make
46
-
```
61
+
```bash copy
62
+
cmake -DFLB_STATIC_CONF=/path/to/my/confdir/
63
+
```
64
+
65
+
1. Build Fluent Bit:
47
66
48
-
At this point the fluent-bit binary generated is ready to run without necessity of further configuration:
67
+
```bash copy
68
+
make
69
+
```
70
+
71
+
The generated `fluent-bit` binary is ready to run without additional configuration:
49
72
50
73
```bash
51
-
$ bin/fluent-bit
74
+
$ bin/fluent-bit
52
75
Fluent-Bit v0.15.0
53
76
Copyright (C) Treasure Data
54
77
55
78
[2018/10/19 15:32:31] [ info] [engine] started (pid=15186)
0 commit comments