mirror of
https://github.com/kubesphere/website.git
synced 2025-12-30 00:52:47 +00:00
Merge pull request #504 from rayzhou2017/toolbox
format toolbox --> log query, events query
This commit is contained in:
commit
60fcd86e0e
|
|
@ -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**.
|
||||
|
||||

|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||

|
||||
|
||||
{{< 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.
|
||||
|
||||
{{</ notice >}}
|
||||
{{</ notice >}}
|
||||
|
||||
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.
|
||||
|
||||

|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||

|
||||
|
||||
{{< notice note >}}
|
||||
{{< notice note >}}
|
||||
|
||||
The event query interface supports dynamic refreshing every 5s, 10s or 15s.
|
||||
|
||||
{{</ notice >}}
|
||||
{{</ notice >}}
|
||||
|
|
|
|||
|
|
@ -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**.
|
||||
|
||||

|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||

|
||||
|
||||
{{< 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`.
|
||||
|
||||
{{</ notice >}}
|
||||
|
||||

|
||||
{{</ notice >}}
|
||||
|
||||
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 >}}
|
||||

|
||||
|
||||
{{< 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.
|
||||
|
||||
{{</ notice >}}
|
||||
{{</ notice >}}
|
||||
|
||||
## 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`.
|
||||
|
||||

|
||||

|
||||
|
||||
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).
|
||||
|
||||
{{</ notice >}}
|
||||
{{</ notice >}}
|
||||
|
||||

|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## 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.
|
||||
|
||||

|
||||

|
||||
|
||||
2. Inspect the container detail page as follows. At the same time, it allows you to open the terminal to debug the container directly.
|
||||
|
||||

|
||||

|
||||
|
|
@ -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/).
|
||||
|
||||
|
||||
{{</ notice >}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue