-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update docs-gen cmd && update README #199
Conversation
b807840
to
0f3623b
Compare
Signed-off-by: zhu733756 <[email protected]>
Signed-off-by: zhu733756 <[email protected]>
Signed-off-by: zhu733756 <[email protected]>
@FeynmanZhou @Felixnoo Could you help to review this pr, I updated the README part. |
Or you can pull another pr to implement it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zhu733756 Hi, please see my comments.
README.md
Outdated
![Kubesphere-logging-fluentbit](docs/images/kubesphere-logging-fluentbit.svg) | ||
![fluentbit-operator](docs/images/fluentbit-operator.svg) | ||
|
||
Besides, we have finished [the pr #189](https://github.com/fluent/fluentbit-operator/pull/189) to integrate fluent-operator as a forward log layer, aims to collect logs from fluentbit or other apps. The whole workflow could be described as below. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pr
-> PR
aims to
-> aiming to
fluentbit
-> Fluent Bit
(If there is no specific reason to use fluentbit
or Fluentbit
, I suggest changing all fluentbit
or Fluentbit
to Fluent Bit
for consistency.)
could be
-> is
I can't understand the meaning of a forward log layer
. Is it a term? 👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unified Logging Layer may be better.
README.md
Outdated
- [Deploy the Kubernetes logging stack with Helm](#deploy-the-kubernetes-logging-stack-with-helm) | ||
- [Collect auditd logs](#collect-auditd-logs) | ||
- [Fluentd](#fluentd) | ||
- [Collect logs from Fluentbit](#collect-logs-from-fluentbit) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fluentbit
-> Fluent Bit
README.md
Outdated
@@ -212,6 +230,63 @@ $ curl localhost:9200/_cat/indices | |||
green open ks-logstash-log-2021.04.06 QeI-k_LoQZ2h1z23F3XiHg 5 1 404879 0 298.4mb 149.2mb | |||
``` | |||
|
|||
### Fluentd | |||
|
|||
Fluentd acts as a forward log layer to collect logs from fluentbit and other Apps. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apps
-> apps
README.md
Outdated
##### Fluentd ClusterFluentdConfig example | ||
|
||
```shell | ||
kubectl apply -f manifests/fluentd/fluentd-cluster-cfg-output-es.yaml | ||
``` | ||
|
||
##### Fluentd FluentdConfig example | ||
|
||
```shell | ||
kubectl apply -f manifests/fluentd/fluentd-namespaced-cfg-output-es.yaml | ||
``` | ||
|
||
##### Fluentd mixed FluentdConfig and ClusterFluentdConfig example | ||
|
||
```shell | ||
kubectl apply -f manifests/fluentd/fluentd-mixed-cfgs-output-es.yaml | ||
``` | ||
|
||
##### Fluentd ClusterOutput and Output example in multi-tenant scenario | ||
|
||
```shell | ||
kubectl apply -f manifests/fluentd/fluentd-mixed-cfgs-multi-tenant-output.yaml | ||
``` | ||
|
||
##### Fluentd outputs to kafka/es example | ||
|
||
```shell | ||
kubectl apply -f manifests/fluentd/fluentd-cluster-cfg-output-kafka.yaml | ||
kubectl apply -f manifests/fluentd/fluentd-cluster-cfg-output-es.yaml | ||
``` | ||
|
||
##### Fluentd buffer example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In line 241, you wrote At first
. I'm wondering what's the logic here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fluent bit sends log to fluentd with the inner forward plugin, and fluentd also needs to use the inner forward plugin to accept the input logs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, each level-5 title in my comment here stands for an option that users can choose to run the command if they want to enable the inner forward plugin for Fluentd to accept the input logs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See below:
Enable Fluent Bit forward plugin
At first, we should enable the forward plugin in Fluent Bit to send logs to Fluentd.
kubectl apply -f manifests/fluentd/fluentbit-output-forward.yaml
And secondly, Fluentd also needs to use the forward input plugin to receive these input logs. This part has been combined into the following examples.
Fluentd ClusterFluentdConfig example
ValueFrom ValueSource `json:"valueFrom,omitempty"` | ||
} | ||
|
||
// +kubebuilder:object:generate:=true | ||
|
||
// ValueSource defines a value source of a secret. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
secret and valuesource have similar description like defines a value source of a secret.
?
@@ -22,6 +22,7 @@ type BufferCommon struct { | |||
LogLevel *string `json:"logLevel,omitempty"` | |||
} | |||
|
|||
// Buffer defines all types for all buffer Plugins |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
=> Buffer defines various parameters for buffer Plugins
@@ -18,6 +18,7 @@ type CommonFields struct { | |||
LogLevel *string `json:"logLevel,omitempty"` | |||
} | |||
|
|||
// Time defines the common parameters for time plugin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for xx plugin => for the xx plugin
@@ -4,7 +4,7 @@ import ( | |||
"fluent.io/fluent-operator/apis/fluentd/v1alpha1/plugins/common" | |||
) | |||
|
|||
// The in_forward Input plugin listens to a TCP socket to receive the event stream | |||
// Forward defines the in_forward Input plugin listens to a TCP socket to receive the event stream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Forward defines the in_forward Input plugin listens to a TCP socket to receive the event stream
=>
// Forward defines the in_forward Input plugin that listens on a TCP socket to receive the event stream
@@ -4,6 +4,7 @@ import ( | |||
"fluent.io/fluent-operator/apis/fluentd/v1alpha1/plugins/common" | |||
) | |||
|
|||
// Http defines the in_http Input plugin listens to a TCP socket to receive the event stream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that listens on a xxx
README.md
Outdated
kubectl apply -f manifests/fluentd/fluentd-namespaced-cfg-output-es.yaml | ||
``` | ||
|
||
##### Fluentd mixed FluentdConfig and ClusterFluentdConfig example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Combining Fluentd cluster-wide and namespaced-wide configuration
README.md
Outdated
kubectl apply -f manifests/fluentd/fluentd-mixed-cfgs-output-es.yaml | ||
``` | ||
|
||
##### Fluentd ClusterOutput and Output example in multi-tenant scenario |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Combining Fluentd cluster-wide output and namespace-wide output for the multi-tenant scenario
README.md
Outdated
kubectl apply -f manifests/fluentd/fluentd-mixed-cfgs-multi-tenant-output.yaml | ||
``` | ||
|
||
##### Fluentd outputs to kafka/es example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Outputing logs to Kafka or Elasticsearch
README.md
Outdated
kubectl apply -f manifests/fluentd/fluentd-cluster-cfg-output-es.yaml | ||
``` | ||
|
||
##### Fluentd buffer example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using buffer for Fluentd output
README.md
Outdated
kubectl apply -f manifests/fluentd/fluentd-cluster-cfg-output-buffer-example.yaml | ||
``` | ||
|
||
#### Collect logs over HTTP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Collecting logs over HTTP
Signed-off-by: zhu733756 <[email protected]>
Signed-off-by: zhu733756 [email protected]
Part of #190