From 10fd272f578fd8863478452a58e525541e0d0cc6 Mon Sep 17 00:00:00 2001 From: Ray Zhou Date: Sun, 8 Nov 2020 15:51:14 +0800 Subject: [PATCH] format log connections and mail server Signed-off-by: Ray Zhou --- .../log-collections/add-es-as-receiver.md | 22 ++- .../add-fluentd-as-receiver.md | 31 ++-- .../log-collections/add-kafka-as-receiver.md | 173 +++++++++--------- .../log-collections/introduction.md | 10 +- .../cluster-settings/mail-server.md | 8 +- 5 files changed, 122 insertions(+), 122 deletions(-) diff --git a/content/en/docs/cluster-administration/cluster-settings/log-collections/add-es-as-receiver.md b/content/en/docs/cluster-administration/cluster-settings/log-collections/add-es-as-receiver.md index 08cbc6fb2..0656bede9 100644 --- a/content/en/docs/cluster-administration/cluster-settings/log-collections/add-es-as-receiver.md +++ b/content/en/docs/cluster-administration/cluster-settings/log-collections/add-es-as-receiver.md @@ -15,23 +15,25 @@ Before adding a log receiver, you need to enable any of the `logging`, `events` 1. To add a log receiver: -- Login KubeSphere with an account of ***platform-admin*** role -- Click ***Platform*** -> ***Clusters Management*** -- Select a cluster if multiple clusters exist -- Click ***Cluster Settings*** -> ***Log Collections*** -- Log receivers can be added by clicking ***Add Log Collector*** + - Login KubeSphere with an account of ***platform-admin*** role + - Click ***Platform*** -> ***Clusters Management*** + - Select a cluster if multiple clusters exist + - Click ***Cluster Settings*** -> ***Log Collections*** + - Log receivers can be added by clicking ***Add Log Collector*** -![Add receiver](/images/docs/cluster-administration/cluster-settings/log-collections/add-receiver.png) + ![Add receiver](/images/docs/cluster-administration/cluster-settings/log-collections/add-receiver.png) 2. Choose ***Elasticsearch*** and fill in the Elasticsearch service address and port like below: -![Add Elasticsearch](/images/docs/cluster-administration/cluster-settings/log-collections/add-es.png) + ![Add Elasticsearch](/images/docs/cluster-administration/cluster-settings/log-collections/add-es.png) 3. Elasticsearch appears in the receiver list of ***Log Collections*** page and its status becomes ***Collecting***. -![Receiver List](/images/docs/cluster-administration/cluster-settings/log-collections/receiver-list.png) + ![Receiver List](/images/docs/cluster-administration/cluster-settings/log-collections/receiver-list.png) 4. Verify whether Elasticsearch is receiving logs sent from Fluent Bit: -- Click ***Log Search*** in the ***Toolbox*** in the bottom right corner. -- You can search logs in the logging console that appears. + - Click ***Log Search*** in the ***Toolbox*** in the bottom right corner. + - You can search logs in the logging console that appears. + + You can read [Log Query](../../../../toolbox/log-query/) to learn how to use the tool. diff --git a/content/en/docs/cluster-administration/cluster-settings/log-collections/add-fluentd-as-receiver.md b/content/en/docs/cluster-administration/cluster-settings/log-collections/add-fluentd-as-receiver.md index 278fbe438..b41f09274 100644 --- a/content/en/docs/cluster-administration/cluster-settings/log-collections/add-fluentd-as-receiver.md +++ b/content/en/docs/cluster-administration/cluster-settings/log-collections/add-fluentd-as-receiver.md @@ -125,31 +125,30 @@ EOF 1. To add a log receiver: -- Login KubeSphere with an account of ***platform-admin*** role -- Click ***Platform*** -> ***Clusters Management*** -- Select a cluster if multiple clusters exist -- Click ***Cluster Settings*** -> ***Log Collections*** -- Log receivers can be added by clicking ***Add Log Collector*** + - Login KubeSphere with an account of ***platform-admin*** role + - Click ***Platform*** -> ***Clusters Management*** + - Select a cluster if multiple clusters exist + - Click ***Cluster Settings*** -> ***Log Collections*** + - Log receivers can be added by clicking ***Add Log Collector*** -![Add receiver](/images/docs/cluster-administration/cluster-settings/log-collections/add-receiver.png) + ![Add receiver](/images/docs/cluster-administration/cluster-settings/log-collections/add-receiver.png) 2. Choose ***Fluentd*** and fill in the Fluentd service address and port like below: -![Add Fluentd](/images/docs/cluster-administration/cluster-settings/log-collections/add-fluentd.png) + ![Add Fluentd](/images/docs/cluster-administration/cluster-settings/log-collections/add-fluentd.png) 3. Fluentd appears in the receiver list of ***Log Collections*** UI and its status shows ***Collecting***. -![Receiver List](/images/docs/cluster-administration/cluster-settings/log-collections/receiver-list.png) - + ![Receiver List](/images/docs/cluster-administration/cluster-settings/log-collections/receiver-list.png) 4. Verify whether Fluentd is receiving logs sent from Fluent Bit: -- Click ***Application Workloads*** in the ***Cluster Management*** UI. -- Select ***Workloads*** and then select the `default` namespace in the ***Workload*** - ***Deployments*** tab -- Click the ***fluentd*** item and then click the ***fluentd-xxxxxxxxx-xxxxx*** pod -- Click the ***fluentd*** container -- In the ***fluentd*** container page, select the ***Container Logs*** tab + - Click ***Application Workloads*** in the ***Cluster Management*** UI. + - Select ***Workloads*** and then select the `default` namespace in the ***Workload*** - ***Deployments*** tab + - Click the ***fluentd*** item and then click the ***fluentd-xxxxxxxxx-xxxxx*** pod + - Click the ***fluentd*** container + - In the ***fluentd*** container page, select the ***Container Logs*** tab -You'll see logs begin to scroll up continuously. + You'll see logs begin to scroll up continuously. -![Container Logs](/images/docs/cluster-administration/cluster-settings/log-collections/container-logs.png) \ No newline at end of file + ![Container Logs](/images/docs/cluster-administration/cluster-settings/log-collections/container-logs.png) \ No newline at end of file diff --git a/content/en/docs/cluster-administration/cluster-settings/log-collections/add-kafka-as-receiver.md b/content/en/docs/cluster-administration/cluster-settings/log-collections/add-kafka-as-receiver.md index d2aa50fae..4da8a863b 100644 --- a/content/en/docs/cluster-administration/cluster-settings/log-collections/add-kafka-as-receiver.md +++ b/content/en/docs/cluster-administration/cluster-settings/log-collections/add-kafka-as-receiver.md @@ -10,8 +10,8 @@ KubeSphere supports using Elasticsearch, Kafka and Fluentd as log receivers. This doc will demonstrate: - Deploy [strimzi-kafka-operator](https://github.com/strimzi/strimzi-kafka-operator) and then create a Kafka cluster and a Kafka topic by creating `Kafka` and `KafkaTopic` CRDs. -- Add Kafka log receiver to receive logs sent from Fluent Bit -- Verify whether the Kafka cluster is receiving logs using [Kafkacat](https://github.com/edenhill/kafkacat) +- Add Kafka log receiver to receive logs sent from Fluent Bit. +- Verify whether the Kafka cluster is receiving logs using [Kafkacat](https://github.com/edenhill/kafkacat). ## Prerequisite @@ -29,105 +29,104 @@ You can use [strimzi-kafka-operator](https://github.com/strimzi/strimzi-kafka-op 1. Install [strimzi-kafka-operator](https://github.com/strimzi/strimzi-kafka-operator) to the `default` namespace: -```bash -helm repo add strimzi https://strimzi.io/charts/ -helm install --name kafka-operator -n default strimzi/strimzi-kafka-operator -``` + ```bash + helm repo add strimzi https://strimzi.io/charts/ + helm install --name kafka-operator -n default strimzi/strimzi-kafka-operator + ``` 2. Create a Kafka cluster and a Kafka topic in the `default` namespace: -To deploy a Kafka cluster and create a Kafka topic, you simply need to open the ***kubectl*** console in ***KubeSphere Toolbox*** and run the following command: + To deploy a Kafka cluster and create a Kafka topic, you simply need to open the ***kubectl*** console in ***KubeSphere Toolbox*** and run the following command: -{{< notice note >}} + {{< notice note >}} +The following will create Kafka and Zookeeper clusters with storage type `ephemeral` which is `emptydir` for demo purpose. You should use other storage types for production, please refer to [kafka-persistent](https://github.com/strimzi/strimzi-kafka-operator/blob/0.19.0/examples/kafka/kafka-persistent.yaml). + {{}} -The following will create Kafka and Zookeeper clusters with storage type `ephemeral` which is `emptydir` for demo purpose. You should use other storage types for production, please refer to [kafka-persistent](https://github.com/strimzi/strimzi-kafka-operator/blob/0.19.0/examples/kafka/kafka-persistent.yaml) - -{{}} - -```yaml -cat < ***Change Status*** -![more](/images/docs/cluster-administration/cluster-settings/log-collections/more.png) + ![more](/images/docs/cluster-administration/cluster-settings/log-collections/more.png) - You can select ***Activate*** or ***Close*** to turn the log receiver on or off -![Change Status](/images/docs/cluster-administration/cluster-settings/log-collections/change-status.png) + ![Change Status](/images/docs/cluster-administration/cluster-settings/log-collections/change-status.png) - Log receiver's status will be changed to ***Close*** if you turn it off, otherwise the status will be ***Collecting*** -![receiver-status](/images/docs/cluster-administration/cluster-settings/log-collections/receiver-status.png) + ![receiver-status](/images/docs/cluster-administration/cluster-settings/log-collections/receiver-status.png) ## Modify or delete a log receiver @@ -89,6 +89,6 @@ You can modify a log receiver or delete it: - Click a log receiver and enter the receiver details page. - You can edit a log receiver by clicking ***Edit*** or ***Edit Yaml*** -![more](/images/docs/cluster-administration/cluster-settings/log-collections/more.png) + ![more](/images/docs/cluster-administration/cluster-settings/log-collections/more.png) - Log receiver can be deleted by clicking ***Delete Log Collector*** diff --git a/content/en/docs/cluster-administration/cluster-settings/mail-server.md b/content/en/docs/cluster-administration/cluster-settings/mail-server.md index b076a8577..e90978145 100644 --- a/content/en/docs/cluster-administration/cluster-settings/mail-server.md +++ b/content/en/docs/cluster-administration/cluster-settings/mail-server.md @@ -18,9 +18,9 @@ This guide demonstrates email notification settings (customized settings support ## Hands-on Lab 1. Log in the web console with one account granted the role `platform-admin`. -2. Click **Platform** in the top left corner and select **Clusters Management**. +2. Click **Platform** in the top left corner and select **Clusters Management**. -![mail_server_guide](/images/docs/alerting/mail_server_guide.png) + ![mail_server_guide](/images/docs/alerting/mail_server_guide.png) 3. Select a cluster from the list and enter it (If you do not enable the [multi-cluster feature](../../../multicluster-management/), you will directly go to the **Overview** page). 4. Select **Mail Server** under **Cluster Settings**. In the page, provide your mail server configuration and SMTP authentication information as follows: @@ -28,6 +28,6 @@ This guide demonstrates email notification settings (customized settings support - **Use SSL Secure Connection**: SSL can be used to encrypt mails, thereby improving the security of information transmitted by mails. Usually you have to configure the certificate for the mail server. - SMTP authentication information: Fill in **SMTP User**, **SMTP Password**, **Sender Email Address**, etc. as below -![mail_server_config](/images/docs/alerting/mail_server_config.png) + ![mail_server_config](/images/docs/alerting/mail_server_config.png) -5. After you complete the above settings, click **Save**. You can send a test email to verify the success of the server configuration. \ No newline at end of file +5. After you complete the above settings, click **Save**. You can send a test email to verify the success of the server configuration.