From 4acebeadfee43a7bd88513693270ea8efa73f8a8 Mon Sep 17 00:00:00 2001 From: Ray Zhou Date: Mon, 9 Nov 2020 21:56:05 +0800 Subject: [PATCH] format toolbox --> log query, events query Signed-off-by: Ray Zhou --- content/en/docs/toolbox/events-query.md | 36 +++++++++---------- content/en/docs/toolbox/log-query.md | 47 +++++++++++++------------ content/en/docs/toolbox/web-kubectl.md | 2 +- 3 files changed, 43 insertions(+), 42 deletions(-) diff --git a/content/en/docs/toolbox/events-query.md b/content/en/docs/toolbox/events-query.md index 44773af27..6d53c6139 100644 --- a/content/en/docs/toolbox/events-query.md +++ b/content/en/docs/toolbox/events-query.md @@ -19,39 +19,39 @@ Kubernetes events provide insight into what is happening inside a cluster, based 1. The event query function is available for all users. Log in the console with any account, hover over the **Toolbox** in the lower right corner and select **Event Search**. -![events_query_guide](/images/docs/events/events_query_guide.png) + ![events_query_guide](/images/docs/events/events_query_guide.png) -2. As shown in the pop-up window, you can see the number of events that the account has permission to view. +2. As shown in the pop-up window, you can see the number of events that the account has permission to view. -![events_query_home](/images/docs/events/events_query_home.png) + ![events_query_home](/images/docs/events/events_query_home.png) -{{< notice note >}} + {{< notice note >}} -- KubeSphere supports event queries on each cluster separately. You can switch the target cluster using the drop-down list next to the search bar. +- KubeSphere supports event queries on each cluster separately if you have enabled the multi-cluster feature. You can switch the target cluster using the drop-down list next to the search bar. - Supported fields in the search bar: - - Workspace - - Project - - Resource Type - - Resource Name - - Reason - - Message - - Category - - Time Range + - Workspace + - Project + - Resource Type + - Resource Name + - Reason + - Message + - Category + - Time Range - You can customize the query time range by selecting **Time Range** in the search bar. KubeSphere stores events for last seven days by default. -{{}} + {{}} 3. Here is an example to query events in the project `test` whose **Message** contains `container` within last 1 hour as shown in the following screenshot. It returns 84 rows of results with the corresponding time, project, and message all displayed. -![events_query_list](/images/docs/events/events_query_list.png) + ![events_query_list](/images/docs/events/events_query_list.png) 4. Click any one of the results from the list, and you can see raw information of it. It is convenient for developers in terms of debugging and analyzing. -![events_query_detail](/images/docs/events/events_query_detail.png) + ![events_query_detail](/images/docs/events/events_query_detail.png) -{{< notice note >}} + {{< notice note >}} The event query interface supports dynamic refreshing every 5s, 10s or 15s. -{{}} \ No newline at end of file + {{}} diff --git a/content/en/docs/toolbox/log-query.md b/content/en/docs/toolbox/log-query.md index e16ffbc1f..4b997b72f 100644 --- a/content/en/docs/toolbox/log-query.md +++ b/content/en/docs/toolbox/log-query.md @@ -21,65 +21,66 @@ In this tutorial, you will learn how to use the log query function, including th 1. The log query function is available for all users. Log in the console with any account, hover over the **Toolbox** in the lower right corner and select **Log Search**. -![log-query-guide](/images/docs/log-query/log-query-guide.png) + ![log-query-guide](/images/docs/log-query/log-query-guide.png) 2. As shown in the pop-up window, you can see a time histogram of log numbers, a cluster selection drop-down list and a log search bar. -![log-query-interface](/images/docs/log-query/log-query-interface.png) + ![log-query-interface](/images/docs/log-query/log-query-interface.png) -{{< notice note >}} -- KubeSphere supports log queries on each cluster separately. You can switch the target cluster using the drop-down list next to the log search bar. + {{< notice note >}} + +- KubeSphere supports log queries on each cluster separately if you have enabled the multi-cluster feature. You can switch the target cluster using the drop-down list next to the log search bar. - Supported fields in the log search bar: - - Keyword - - Project - - Workload - - Pod - - Container - - Time Range + - Keyword + - Project + - Workload + - Pod + - Container + - Time Range - The keyword field supports the query of keyword combinations. For example, you can use "Error", "Fail", "Fatal", "Exception", and "Warning" together to query all the exception logs. - The keyword field supports exact query and fuzzy query. The fuzzy query provides case-insensitive fuzzy matching and retrieval of full terms by the first half of a word or phrase based on the ElasticSearch segmentation rules. For example, you can retrieve the logs containing `node_cpu_total` by searching the keyword `node_cpu` instead of the keyword `cpu`. -{{}} - -![log-query-time-range](/images/docs/log-query/log-query-time-range.png) + {{}} 3. You can customize the query time range by selecting **Time Range** in the log search bar. Alternatively, click on the bars in the time histogram, and KubeSphere will use the time range of that bar for log queries. -{{< notice note >}} + ![log-query-time-range](/images/docs/log-query/log-query-time-range.png) + + {{< notice note >}} + - KubeSphere stores logs for last seven days by default. - Each cluster has its own log retention period which can be set separately. You can modify it in `ClusterConfiguration`. Refer to [KubeSphere Logging System](../../pluggable-components/logging/) for more details. -{{}} + {{}} ## Use Search Parameters 1. You can provide as many fields as possible to narrow down your search results. Below is an example of a log query on the cluster `product` with the keyword `error` in the project `kubesphere-system` within `last 12 hours`. -![log-query-log-search](/images/docs/log-query/log-query-log-search.png) + ![log-query-log-search](/images/docs/log-query/log-query-log-search.png) 2. It returns logs of 13 rows with the corresponding time, project, pod and container information all displayed. 3. Click any one of the results from the list. Drill into its detail page and inspect the log from this pod, including the complete context on the right. It is convenient for developers in terms of debugging and analyzing. -{{< notice note >}} + {{< notice note >}} The log query interface supports dynamic refreshing with 5s, 10s or 15s, and allows users to export logs to a local file for further analysis (in the top-right corner). -{{}} + {{}} -![log-query-log-detail](/images/docs/log-query/log-query-log-detail.png) + ![log-query-log-detail](/images/docs/log-query/log-query-log-detail.png) 4. As you can see from the left panel, you can switch between pods and inspect its containers within the same project from the drop-down list. In this case, you can detect if any abnormal pods affect other pods. -![log-query-inspect-other-pods](/images/docs/log-query/log-query-inspect-other-pods.png) - + ![log-query-inspect-other-pods](/images/docs/log-query/log-query-inspect-other-pods.png) ## Drill into Detail Page 1. If the log looks abnormal, you can drill into the pod detail page or container detail page to further inspect container logs, resource monitoring graphs and events. -![log-query-drill](/images/docs/log-query/log-query-drill.png) + ![log-query-drill](/images/docs/log-query/log-query-drill.png) 2. Inspect the container detail page as follows. At the same time, it allows you to open the terminal to debug the container directly. -![log-query-drill-container](/images/docs/log-query/log-query-drill-container.png) \ No newline at end of file + ![log-query-drill-container](/images/docs/log-query/log-query-drill-container.png) \ No newline at end of file diff --git a/content/en/docs/toolbox/web-kubectl.md b/content/en/docs/toolbox/web-kubectl.md index e5824aff8..4947f92e3 100644 --- a/content/en/docs/toolbox/web-kubectl.md +++ b/content/en/docs/toolbox/web-kubectl.md @@ -47,5 +47,5 @@ In this tutorial, you will learn how to use web kubectl to operate on and manage - `NAME`: Specifies the name of the resource. Names are case-sensitive. If the name is omitted, details for all resources are displayed, such as `kubectl get pods`. - `flags`: Specifies optional flags. For example, you can use the `-s` or `--server` flags to specify the address and port of the Kubernetes API server. - If you need help, run `kubectl help` from the terminal window or refer to the [Kubernetes kubectl CLI documentation](https://kubernetes.io/docs/reference/kubectl/overview/). - + {{}}