Skip to content

Commit 65892ed

Browse files
authored
Updated README.md with Monitoring of fluentbit using the FluentBitConfig (fluent#103)
* updated README.md with Monitoring of fluentbit using the FluentBitConfig * updated the url for the parsers.conf
1 parent bed98d4 commit 65892ed

File tree

1 file changed

+80
-2
lines changed

1 file changed

+80
-2
lines changed

README.md

Lines changed: 80 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Once installed, the Fluent Bit Operator provides the following features:
1616
- [Quick Start](#quick-start)
1717
- [Logging Stack](#logging-stack)
1818
- [Auditd](#auditd)
19+
- [Monitoring](#monitoring)
1920
- [API Doc](#api-doc)
2021
- [Best Practice](#best-practice)
2122
- [Plugin Grouping](#plugin-grouping)
@@ -143,6 +144,83 @@ $ curl localhost:9200/_cat/indices
143144
green open ks-logstash-log-2021.04.06 QeI-k_LoQZ2h1z23F3XiHg 5 1 404879 0 298.4mb 149.2mb
144145
```
145146

147+
## Monitoring
148+
149+
Fluent Bit comes with a built-in HTTP Server. According to the official [documentation](https://docs.fluentbit.io/manual/administration/monitoring) of fluentbit You can enable this by enabling the HTTP server from the fluent bit configuration file:
150+
151+
```conf
152+
[SERVICE]
153+
HTTP_Server On
154+
HTTP_Listen 0.0.0.0
155+
HTTP_PORT 2020
156+
```
157+
158+
When you use the kubesphere/fluentbit-operator, You can enable this from `FluentBitConfig` manifest. Example is below:
159+
160+
```yaml
161+
apiVersion: logging.kubesphere.io/v1alpha2
162+
kind: FluentBitConfig
163+
metadata:
164+
name: fluent-bit-config
165+
namespace: logging-system
166+
spec:
167+
filterSelector:
168+
matchLabels:
169+
logging.kubesphere.io/enabled: 'true'
170+
inputSelector:
171+
matchLabels:
172+
logging.kubesphere.io/enabled: 'true'
173+
outputSelector:
174+
matchLabels:
175+
logging.kubesphere.io/enabled: 'true'
176+
service:
177+
httpListen: 0.0.0.0
178+
httpPort: 2020
179+
httpServer: true
180+
parsersFile: parsers.conf
181+
182+
```
183+
184+
Once HTTP server is enabled, you should be able to get the information:
185+
186+
```bash
187+
curl <podIP>:2020 | jq .
188+
189+
{
190+
"fluent-bit": {
191+
"version": "1.7.3",
192+
"edition": "Community",
193+
"flags": [
194+
"FLB_HAVE_PARSER",
195+
"FLB_HAVE_RECORD_ACCESSOR",
196+
"FLB_HAVE_STREAM_PROCESSOR",
197+
"FLB_HAVE_TLS",
198+
"FLB_HAVE_OPENSSL",
199+
"FLB_HAVE_AWS",
200+
"FLB_HAVE_SIGNV4",
201+
"FLB_HAVE_SQLDB",
202+
"FLB_HAVE_METRICS",
203+
"FLB_HAVE_HTTP_SERVER",
204+
"FLB_HAVE_SYSTEMD",
205+
"FLB_HAVE_FORK",
206+
"FLB_HAVE_TIMESPEC_GET",
207+
"FLB_HAVE_GMTOFF",
208+
"FLB_HAVE_UNIX_SOCKET",
209+
"FLB_HAVE_PROXY_GO",
210+
"FLB_HAVE_JEMALLOC",
211+
"FLB_HAVE_LIBBACKTRACE",
212+
"FLB_HAVE_REGEX",
213+
"FLB_HAVE_UTF8_ENCODER",
214+
"FLB_HAVE_LUAJIT",
215+
"FLB_HAVE_C_TLS",
216+
"FLB_HAVE_ACCEPT4",
217+
"FLB_HAVE_INOTIFY"
218+
]
219+
}
220+
}
221+
```
222+
223+
146224
## API Doc
147225

148226
The list below shows supported plugins which are based on Fluent Bit v1.7.x+. For more information, please refer to the API docs of each plugin.
@@ -198,7 +276,7 @@ Path to file in Fluent Bit config should be well regulated. Fluent Bit Operator
198276
199277
## Custom Parser
200278

201-
To enable parsers, you must set the value of `FluentBitConfig.Spec.Service.ParsersFile` to `parsers.conf`. Your custom parsers will be included into the built-in parser config via `@INCLUDE /fluent-bit/config/parsers.conf`. Note that the parsers.conf contains a few built-in parsers, for example, docker. Read [parsers.conf](https://github.com/kubesphere/fluent-bit/blob/v1.6.2-reload/conf/parsers.conf) for more information.
279+
To enable parsers, you must set the value of `FluentBitConfig.Spec.Service.ParsersFile` to `parsers.conf`. Your custom parsers will be included into the built-in parser config via `@INCLUDE /fluent-bit/config/parsers.conf`. Note that the parsers.conf contains a few built-in parsers, for example, docker. Read [parsers.conf](https://github.com/kubesphere/fluentbit-operator/blob/master/conf/parsers.conf) for more information.
202280

203281
Check out the demo in the folder `/manifests/regex-parser` for how to use a custom regex parser.
204282

@@ -231,4 +309,4 @@ Check out the demo in the folder `/manifests/regex-parser` for how to use a cust
231309

232310
### Manifests
233311

234-
Most files under the folder [manifests/setup](manifests/setup) are automatically generated from [config](config). Don't edit them directly, run `make manifests` instead, then replace these files accordingly.
312+
Most files under the folder [manifests/setup](manifests/setup) are automatically generated from [config](config). Don't edit them directly, run `make manifests` instead, then replace these files accordingly.

0 commit comments

Comments
 (0)