Kibana:可视化与仪表板
了解如何使用 Kibana 探索和可视化数据。学习如何根据 Elasticsearch 索引创建功能强大的仪表板和报告。
Kibana:可视化与仪表板 是 CoddyKit 上的免费 System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) 课时。 这是第 3 节课,共 4 节。 你可以在下方免费阅读本课时的完整内容 — 然后在浏览器中使用内置代码编辑器和全天候 AI 导师进行实践。 这是 System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) 学习路径的一部分,你的进度在网页和 CoddyKit 应用中同步。 System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) 课程共包含 4 节课。
本课时的部分内容尚未翻译,以英文显示。
What is Kibana?
Welcome to Kibana! It's the "K" in the ELK Stack, serving as your window into the data stored in Elasticsearch. Kibana is a powerful open-source tool for data visualization and exploration.
It allows you to query, analyze, and visualize your Elasticsearch data, helping you uncover insights and monitor the health of your systems.
Navigating Kibana's Interface
When you first open Kibana, you'll see a navigation menu on the left. Key sections include:
- Discover: Explore raw data, search, and filter.
- Visualize: Create individual charts and graphs.
- Dashboard: Combine multiple visualizations into a single view.
- Management: Configure indices, users, and settings.
We'll focus on Discover, Visualize, and Dashboard.
Discovering Raw Data
The Discover section is where you interact directly with your raw data from Elasticsearch. Think of it as a powerful search engine for your logs or metrics.
- Search Bar: Use Lucene query syntax or KQL (Kibana Query Language) to find specific events.
- Filters: Add interactive filters to narrow down your results.
- Table View: See individual documents (logs) and their fields.
It's crucial for debugging and detailed investigation.
Focusing on Time Ranges
Observability data is time-series data. The time range selector in Kibana (usually top right) is vital for focusing your analysis.
- Quick Selects: "Last 15 minutes," "Last 24 hours," etc.
- Relative Time: "Last 7 days," "Yesterday."
- Absolute Time: Specify exact start and end dates/times.
Choosing the right time range ensures you're looking at relevant data for your investigation.
Introduction to Visualizations
While Discover shows raw data, Visualize transforms that data into meaningful charts and graphs. Visualizations help you quickly spot trends, anomalies, and patterns that might be hidden in tables of raw data.
Kibana supports a wide array of visualization types, from simple metrics to complex geo maps.
Building Your First Chart
Let's create a simple visualization, like a bar chart showing log counts over time. In the Visualize section:
- Choose a visualization type (e.g., Vertical Bar).
- Select your Elasticsearch index pattern.
- Define your Y-axis (e.g., "Count" aggregation).
- Define your X-axis (e.g., "Date Histogram" on your timestamp field).
This shows you how many logs occurred in each time interval.
Exploring Other Visualizations
Beyond bar charts, Kibana offers many options to represent your data effectively:
- Line Charts: Great for showing trends over time (e.g., CPU usage).
- Pie Charts: Useful for showing proportions (e.g., error rates by service).
- Data Tables: Display aggregated data in a tabular format.
- Metric Visualizations: Show a single, prominent number (e.g., total errors).
Choose the type that best tells your data's story.
Bringing It All Together: Dashboards
A Dashboard in Kibana is a collection of saved visualizations arranged on a single screen. They provide a high-level overview of your system's health, performance, or specific application metrics.
Dashboards are dynamic: applying a time filter or a global search to a dashboard updates all its visualizations simultaneously.
Constructing a Dashboard
Creating a dashboard is straightforward:
- Navigate to the Dashboard section.
- Click "Create new dashboard."
- Click "Add" and select your saved visualizations from the list.
- Arrange and resize them as needed.
You can also add new visualizations directly from the dashboard view. This allows for quick, comprehensive monitoring.
Kibana Knowledge Check
Time to test your understanding of Kibana's core functions!
Kibana: Your Data's Storyteller
In this lesson, we explored Kibana, the visualization layer of the ELK Stack. You learned to:
- Use Discover for raw data exploration.
- Create various charts in Visualize.
- Combine these into insightful Dashboards.
Kibana empowers you to transform vast amounts of data into actionable insights, making your systems more understandable and observable. Next, we'll dive into advanced ELK techniques!
常见问题解答
「Kibana:可视化与仪表板」课时是免费的吗?
是的 — 「Kibana:可视化与仪表板」的完整文本可在网页上免费阅读。要进行交互式练习(内置代码编辑器和全天候 AI 导师)并解锁 System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) 课程的其余内容,请升级到 CoddyKit PRO。 System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) 课程共包含 4 节课。
「Kibana:可视化与仪表板」这节课中我会学到什么?
了解如何使用 Kibana 探索和可视化数据。学习如何根据 Elasticsearch 索引创建功能强大的仪表板和报告。 你通过在浏览器中直接运行的动手代码来练习 System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry),全天候 AI 导师会在你学习这节课的过程中回答你的问题。
学习 System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) 需要有经验吗?
无需任何先前经验。CoddyKit 上的 System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) 课程适合初学者到高级学习者,你可以从这里开始或从头开始,按照自己的节奏学习。 这是第 3 节课,共 4 节。
「Kibana:可视化与仪表板」课时需要多长时间?
大多数 CoddyKit 课程大约需要 5–10 分钟。每节课都很精短且互动,所以你能稳步进步,并在网页和应用中从离开的地方继续。
我能在这节 System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) 课中编写并运行代码吗?
能。每节 System Observability: Logging, Metrics & Tracing (ELK + OpenTelemetry) 课都包含内置代码编辑器,你可以在浏览器中直接编写并运行真实代码,并获得即时 AI 反馈 — 无需本地设置。
此课程中的所有课时
- Elasticsearch:索引与搜索
- Logstash:数据摄取与处理
- Kibana:可视化与仪表板
- Beats:轻量级数据采集器