website/content/en/docs/toolbox/events-query.md
Sherlock113 3367c438f9 Update alerting policy, message and event query wording
Signed-off-by: Sherlock113 <sherlockxu@yunify.com>
2020-10-12 13:39:57 +08:00

2.2 KiB

title keywords description linkTitle weight
Event Query KubeSphere, Kubernetes, Event, Query How to perform event query in KubeSphere. Event Query 4190

Objective

Kubernetes events provide insight into what is happening inside a cluster, based on which KubeSphere adds longer historical query and aggregation capabilities, and also supports event query for tenant isolation. This guide demonstrates how you will do multi-level, fine-grained event queries to track the state of your components.

Prerequisites

Hands-on Lab

  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

  1. As shown in the pop-up window, you can see the number of events that the account has permission to view.

events_query_home

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

  • Supported fields in the search bar:

    • 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 >}}

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

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

{{< notice note >}}

The event query interface supports dynamic refreshing every 5s, 10s or 15s.

{{</ notice >}}