@@ -109,8 +109,8 @@ MSI installers are also available:
109
109
110
110
To check the integrity, use the ` Get-FileHash ` cmdlet for PowerShell.
111
111
112
- ``` text copy
113
- PS> Get-FileHash fluent-bit-4.0.4-win32.exe
112
+ ``` shell copy
113
+ Get-FileHash fluent-bit-4.0.4-win32.exe
114
114
```
115
115
116
116
## Installing from a ZIP archive
@@ -121,8 +121,8 @@ PS> Get-FileHash fluent-bit-4.0.4-win32.exe
121
121
1 . Expand the ZIP archive. You can do this by clicking ** Extract All** in Explorer
122
122
or ` Expand-Archive ` in PowerShell.
123
123
124
- ``` text
125
- PS> Expand-Archive fluent-bit-4.0.4-win64.zip
124
+ ``` shell
125
+ Expand-Archive fluent-bit-4.0.4-win64.zip
126
126
```
127
127
128
128
The ZIP package contains the following set of files.
@@ -146,14 +146,14 @@ PS> Get-FileHash fluent-bit-4.0.4-win32.exe
146
146
147
147
1 . Launch ` cmd.exe ` or PowerShell on your machine, and execute ` fluent-bit.exe ` :
148
148
149
- ``` text
150
- PS> .\bin\fluent-bit.exe -i dummy -o stdout
149
+ ``` shell
150
+ .\b in\f luent-bit.exe -i dummy -o stdout
151
151
```
152
152
153
153
The following output indicates Fluent Bit is running:
154
154
155
- ``` text
156
- PS> .\bin\fluent-bit.exe -i dummy -o stdout
155
+ ``` shell
156
+ .\b in\f luent-bit.exe -i dummy -o stdout
157
157
Fluent Bit v2.0.x
158
158
* Copyright (C) 2019-2020 The Fluent Bit Authors
159
159
* Copyright (C) 2015-2018 Treasure Data
@@ -178,15 +178,11 @@ To halt the process, press `Control+C` in the terminal.
178
178
1 . Download an EXE installer for the appropriate 32-bit or 64-bit build.
179
179
1 . Double-click the EXE installer you've downloaded. The installation wizard starts.
180
180
181
- ![ Installation wizard screenshot] ( < ../.gitbook/assets/windows\_ installer (1) (1).png > )
182
-
183
181
1 . Click ** Next** and finish the installation. By default, Fluent Bit is installed
184
182
in ` C:\Program Files\fluent-bit\ ` .
185
183
186
- You should be able to launch Fluent Bit using the following PowerShell command:.
187
-
188
- ``` text
189
- PS> C:\Program Files\fluent-bit\bin\fluent-bit.exe -i dummy -o stdout
184
+ ``` shell
185
+ & " C:\Program Files\fluent-bit\bin\fluent-bit.exe" -i dummy -o stdout
190
186
```
191
187
192
188
### Installer options
@@ -198,8 +194,8 @@ for silent installation and install directory.
198
194
199
195
To silently install to ` C:\fluent-bit ` directory here is an example:
200
196
201
- ``` text
202
- PS> <installer exe> /S /D=C:\fluent-bit
197
+ ``` shell
198
+ < installer exe> /S /D=C:\f luent-bit
203
199
```
204
200
205
201
The uninstaller also supports a silent uninstall using the same ` /S ` flag.
@@ -228,15 +224,15 @@ C:\fluent-bit\
228
224
To register Fluent Bit as a Windows service, execute the following command on
229
225
at a command prompt. A single space is required after ` binpath= ` .
230
226
231
- ``` text
227
+ ``` shell
232
228
sc.exe create fluent-bit binpath= " \fluent-bit\bin\fluent-bit.exe -c \fluent-bit\conf\fluent-bit.conf"
233
229
```
234
230
235
231
Fluent Bit can be started and managed as a normal Windows service.
236
232
237
- ``` text
238
- % sc.exe start fluent-bit
239
- % sc.exe query fluent-bit
233
+ ``` shell
234
+ sc.exe start fluent-bit
235
+ sc.exe query fluent-bit
240
236
SERVICE_NAME: fluent-bit
241
237
TYPE : 10 WIN32_OWN_PROCESS
242
238
STATE : 4 Running
@@ -245,46 +241,38 @@ SERVICE_NAME: fluent-bit
245
241
246
242
To halt the Fluent Bit service, use the ` stop ` command.
247
243
248
- ``` text
244
+ ``` shell
249
245
sc.exe stop fluent-bit
250
246
```
251
247
252
248
To start Fluent Bit automatically on boot, execute the following:
253
249
254
- ``` text
250
+ ``` shell
255
251
sc.exe config fluent-bit start= auto
256
252
```
257
253
258
254
## FAQs
259
255
260
- ### Fluent Bit fails to start up when installed under ` C:\Program Files `
261
-
262
- Quotations are required if file paths contain spaces. For example:
263
-
264
- ``` text
265
- sc.exe create fluent-bit binpath= "\"C:\Program Files\fluent-bit\bin\fluent-bit.exe\" -c \"C:\Program Files\fluent-bit\conf\fluent-bit.conf\""
266
- ```
267
-
268
256
### Can you manage Fluent Bit service using PowerShell?
269
257
270
258
Instead of ` sc.exe ` , PowerShell can be used to manage Windows services.
271
259
272
260
Create a Fluent Bit service:
273
261
274
- ``` text
275
- PS> New-Service fluent-bit -BinaryPathName "`"C:\Program Files\fluent-bit\bin\fluent-bit.exe`" -c `"C:\Program Files\fluent-bit\conf\fluent-bit.conf`"" -StartupType Automatic -Description "This service runs Fluent Bit, a log collector that enables real-time processing and delivery of log data to centralized logging systems."
262
+ ``` shell
263
+ New-Service fluent-bit -BinaryPathName " ` " C:\Program Files\fluent-bit\bin\fluent-bit.exe` " -c ` " C:\Program Files\fluent-bit\conf\fluent-bit.conf` " " -StartupType Automatic -Description " This service runs Fluent Bit, a log collector that enables real-time processing and delivery of log data to centralized logging systems."
276
264
` ` `
277
265
278
266
Start the service:
279
267
280
- ``` text
281
- PS> Start-Service fluent-bit
268
+ ` ` ` shell
269
+ Start-Service fluent-bit
282
270
` ` `
283
271
284
272
Query the service status:
285
273
286
- ``` text
287
- PS> get-Service fluent-bit | format-list
274
+ ` ` ` shell
275
+ get-Service fluent-bit | format-list
288
276
Name : fluent-bit
289
277
DisplayName : fluent-bit
290
278
Status : Running
@@ -298,14 +286,14 @@ ServiceType : Win32OwnProcess
298
286
299
287
Stop the service:
300
288
301
- ``` text
302
- PS> Stop-Service fluent-bit
289
+ ` ` ` shell
290
+ Stop-Service fluent-bit
303
291
` ` `
304
292
305
293
Remove the service (requires PowerShell 6.0 or later)
306
294
307
- ``` text
308
- PS> Remove-Service fluent-bit
295
+ ` ` ` shell
296
+ Remove-Service fluent-bit
309
297
` ` `
310
298
311
299
## Compile from Source
@@ -318,21 +306,21 @@ compile Fluent Bit by yourself.
318
306
1. Install Microsoft Visual C++ to compile Fluent Bit. You can install the minimum
319
307
toolkit using the following command:
320
308
321
- ``` text
322
- PS> wget -o vs.exe https://aka.ms/vs/16/release/vs_buildtools.exe
323
- PS> start vs.exe
309
+ ` ` ` shell
310
+ wget -o vs.exe https://aka.ms/vs/16/release/vs_buildtools.exe
311
+ start vs.exe
324
312
` ` `
325
313
326
314
1. Choose ` C++ Build Tools` and ` C++ CMake tools for Windows` and wait until the process finishes.
327
315
328
316
1. Install flex and bison. One way to install them on Windows is to use
329
317
[winflexbison](https://github.com/lexxmark/winflexbison).
330
318
331
- ``` text
332
- PS> wget -o winflexbison.zip https://github.com/lexxmark/winflexbison/releases/download/v2.5.22/win_flex_bison-2.5.22.zip
333
- PS> Expand-Archive winflexbison.zip -Destination C:\WinFlexBison
334
- PS> cp -Path C:\WinFlexBison\win_bison.exe C:\WinFlexBison\bison.exe
335
- PS> cp -Path C:\WinFlexBison\win_flex.exe C:\WinFlexBison\flex.exe
319
+ ` ` ` shell
320
+ wget -o winflexbison.zip https://github.com/lexxmark/winflexbison/releases/download/v2.5.22/win_flex_bison-2.5.22.zip
321
+ Expand-Archive winflexbison.zip -Destination C:\W inFlexBison
322
+ cp -Path C:\W inFlexBison\w in_bison.exe C:\W inFlexBison\b ison.exe
323
+ cp -Path C:\W inFlexBison\w in_flex.exe C:\W inFlexBison\f lex.exe
336
324
` ` `
337
325
338
326
1. Add the path ` C:\W inFlexBison` to your systems environment variable ` Path` .
@@ -342,9 +330,9 @@ PS> start vs.exe
342
330
343
331
1. Install [Git](https://git-scm.com/download/win) to pull the source code from the repository.
344
332
345
- ``` text
346
- PS> wget -o git.exe https://github.com/git-for-windows/git/releases/download/v2.28.0.windows.1/Git-2.28.0-64-bit.exe
347
- PS> start git.exe
333
+ ` ` ` shell
334
+ wget -o git.exe https://github.com/git-for-windows/git/releases/download/v2.28.0.windows.1/Git-2.28.0-64-bit.exe
335
+ start git.exe
348
336
` ` `
349
337
350
338
### Compilation
@@ -358,21 +346,21 @@ PS> start vs.exe
358
346
359
347
1. Clone the source code of Fluent Bit.
360
348
361
- ``` text
362
- % git clone https://github.com/fluent/fluent-bit
363
- % cd fluent-bit/build
349
+ ` ` ` shell
350
+ git clone https://github.com/fluent/fluent-bit
351
+ cd fluent-bit/build
364
352
` ` `
365
353
366
354
1. Compile the source code.
367
355
368
- ``` text
369
- % cmake .. -G "NMake Makefiles"
370
- % cmake --build .
356
+ ` ` ` shell
357
+ cmake .. -G " NMake Makefiles"
358
+ cmake --build .
371
359
` ` `
372
360
373
361
Now you should be able to run Fluent Bit:
374
362
375
- ``` text
363
+ ` ` ` shell
376
364
.\b in\d ebug\f luent-bit.exe -i dummy -o stdout
377
365
` ` `
378
366
0 commit comments