0Pricing
Elasticsearch & Full Text Search Systems · 课时

使用 Kibana 进行可视化

掌握 Kibana,创建仪表板、可视化数据,并以交互方式探索 Elasticsearch 索引,用于监控和分析。

使用 Kibana 进行可视化 是 CoddyKit 上的免费 Elasticsearch & Full Text Search Systems 课时。 这是第 1 节课,共 4 节。 你可以在下方免费阅读本课时的完整内容 — 然后在浏览器中使用内置代码编辑器和全天候 AI 导师进行实践。 这是 Elasticsearch & Full Text Search Systems 学习路径的一部分,你的进度在网页和 CoddyKit 应用中同步。 Elasticsearch & Full Text Search Systems 课程共包含 4 节课。

本课时的部分内容尚未翻译,以英文显示。

Intro to Kibana

Kibana is the visualization and management tool for the Elastic Stack. It lets you explore your Elasticsearch data, create beautiful visualizations, and build interactive dashboards.

Think of it as the "eyes" for your Elasticsearch data, helping you understand trends, anomalies, and patterns at a glance.

Navigating Kibana

Kibana organizes its features into several key applications, accessible from the left-hand navigation menu:

  • Discover: Explore raw document data.
  • Visualize: Create charts, graphs, and maps.
  • Dashboard: Combine visualizations into a single view.
  • Stack Management: Configure index patterns, users, and more.

We'll focus on Discover, Visualize, and Dashboard in this lesson.

Connecting Your Data

Before you can explore data, Kibana needs to know where to look. This is done by defining an Index Pattern.

An index pattern is a string that matches one or more Elasticsearch indices. For example, logs-* would match logs-2023-01 and logs-2023-02.

You typically create index patterns under "Stack Management" > "Index Patterns".

Exploring with Discover

The Discover tab is your starting point for exploring raw data. Here, you can:

  • See individual documents in a table format.
  • Apply search queries using KQL (Kibana Query Language) or Lucene syntax.
  • Filter data by time range using the time picker.
  • View field statistics and distributions to understand your data better.

It's like a powerful data explorer for your Elasticsearch indices.

Hands-on Discover

Let's index a few simple documents into an index called products. Then, we can find them in Kibana's Discover tab.

Run these cURL commands in your terminal to add some data:

POST /products/_doc/1
{
  "name": "Laptop",
  "price": 1200,
  "category": "Electronics"
}

POST /products/_doc/2
{
  "name": "Mouse",
  "price": 25,
  "category": "Electronics"
}

POST /products/_doc/3
{
  "name": "Keyboard",
  "price": 75,
  "category": "Electronics"
}

Creating an Index Pattern

After indexing the products, go to Kibana's "Stack Management" > "Index Patterns".

Click "Create index pattern" and enter products. Select the @timestamp field (if present, otherwise just proceed) and create the pattern.

Now you can navigate to the Discover tab, select the products index pattern, and see your indexed documents!

Your First Visualization

Visualizations help make sense of data. Let's create a simple bar chart showing the count of documents by category.

Steps:

  1. Go to Visualize > Create new visualization.
  2. Choose a type, e.g., Vertical Bar.
  3. Select your index pattern (e.g., products).
  4. For the X-axis, select Terms aggregation on the category.keyword field.

This will show bars for "Electronics", etc., based on your data.

Exploring Viz Types

Kibana offers a rich set of visualization types for different data stories:

  • Line Chart: Best for showing trends over time.
  • Pie Chart: Represents proportions of a whole.
  • Metric: Displays a single key performance indicator (e.g., total sales).
  • Area Chart: Useful for cumulative totals over time.
  • Data Table: Presents raw aggregated data in a tabular format.

Choose the type that best communicates your data's narrative.

Building a Dashboard

A Dashboard brings together multiple visualizations into a single, interactive view. This allows you to monitor different aspects of your data simultaneously.

You can drag and drop visualizations, resize them, and arrange them to create a coherent data story. Dashboards are perfect for operational monitoring, reporting, or business intelligence.

Interactive Dashboards

Kibana Dashboards aren't just static images; they are highly interactive:

  • Time Range: Apply a global time filter to all visualizations on the dashboard.
  • Filters: Add specific filters (e.g., category: "Electronics") to narrow down the data.
  • Drill-downs: Click on a bar in a chart or a slice in a pie chart to automatically filter the entire dashboard.

This interactivity helps users quickly analyze and pinpoint specific data points.

Kibana Quick Check

You've learned about Kibana's core functions. Let's test your understanding.

Kibana Recap

You've learned that Kibana is an indispensable tool for visualizing and managing your Elasticsearch data. We covered:

  • Its main applications: Discover, Visualize, and Dashboard.
  • How to set up index patterns to connect to your data.
  • Exploring raw data in the Discover tab.
  • Creating basic visualizations like bar charts.
  • Building and interacting with dashboards for comprehensive data views.

Kibana empowers you to turn raw data into actionable insights and compelling data stories!

常见问题解答

「使用 Kibana 进行可视化」课时是免费的吗?

是的 — 「使用 Kibana 进行可视化」的完整文本可在网页上免费阅读。要进行交互式练习(内置代码编辑器和全天候 AI 导师)并解锁 Elasticsearch & Full Text Search Systems 课程的其余内容,请升级到 CoddyKit PRO。 Elasticsearch & Full Text Search Systems 课程共包含 4 节课。

「使用 Kibana 进行可视化」这节课中我会学到什么?

掌握 Kibana,创建仪表板、可视化数据,并以交互方式探索 Elasticsearch 索引,用于监控和分析。 你通过在浏览器中直接运行的动手代码来练习 Elasticsearch & Full Text Search Systems,全天候 AI 导师会在你学习这节课的过程中回答你的问题。

学习 Elasticsearch & Full Text Search Systems 需要有经验吗?

无需任何先前经验。CoddyKit 上的 Elasticsearch & Full Text Search Systems 课程适合初学者到高级学习者,你可以从这里开始或从头开始,按照自己的节奏学习。 这是第 1 节课,共 4 节。

「使用 Kibana 进行可视化」课时需要多长时间?

大多数 CoddyKit 课程大约需要 5–10 分钟。每节课都很精短且互动,所以你能稳步进步,并在网页和应用中从离开的地方继续。

我能在这节 Elasticsearch & Full Text Search Systems 课中编写并运行代码吗?

能。每节 Elasticsearch & Full Text Search Systems 课都包含内置代码编辑器,你可以在浏览器中直接编写并运行真实代码,并获得即时 AI 反馈 — 无需本地设置。

此课程中的所有课时

  1. 使用 Kibana 进行可视化
  2. 使用 Logstash 进行数据摄取
  3. 与应用程序集成(客户端)
  4. 用于轻量级数据传输的 Beats
← 返回 Elasticsearch & Full Text Search Systems