Skip to content
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

Merged
merged 4 commits into from
Feb 15, 2022
Merged

Conversation

zhu733756
Copy link
Member

@zhu733756 zhu733756 commented Feb 15, 2022

Signed-off-by: zhu733756 [email protected]

  • update docs-gen cmd
  • update README.md
  • update RoadMap

Part of #190

@zhu733756 zhu733756 force-pushed the master branch 2 times, most recently from b807840 to 0f3623b Compare February 15, 2022 04:02
Signed-off-by: zhu733756 <[email protected]>
Signed-off-by: zhu733756 <[email protected]>
@zhu733756
Copy link
Member Author

zhu733756 commented Feb 15, 2022

@FeynmanZhou @Felixnoo Could you help to review this pr, I updated the README part.

@zhu733756
Copy link
Member Author

@FeynmanZhou @Felixnoo Could you help to review this pr, I updated the README part.

Or you can pull another pr to implement it.

Copy link

@Felixnoo Felixnoo left a 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.

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? 👀

Copy link
Member Author

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)

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.

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
Comment on lines 247 to 278
##### 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

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?

Copy link
Member Author

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.

Copy link

@Felixnoo Felixnoo Feb 15, 2022

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?

Copy link
Member Author

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.
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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
Copy link
Member

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]>
@benjaminhuo benjaminhuo merged commit 55730d0 into fluent:master Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants