0Pricing
Elasticsearch & Full Text Search Systems · 课时

用于轻量级数据传输的 Beats

了解 Beats 这一轻量级数据传输器家族,它们以极小的资源占用将日志、指标和其他数据发送到 Elasticsearch 或 Logstash。

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

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

The Last Mile of Ingestion

Logstash is powerful but heavy. To collect data right at the source (a server, container, or device) Elastic offers Beats: small, single-purpose agents written in Go that ship data efficiently.

What Beats Are

Each Beat focuses on one job and runs as a tiny resident process with a low memory footprint, making it safe to deploy on thousands of machines simultaneously.

Filebeat

Filebeat tails log files and forwards each line. It tracks read offsets so it resumes correctly after a restart and never loses or duplicates lines under normal operation.

filebeat.inputs:
  - type: log
    paths:
      - /var/log/nginx/*.log

Metricbeat

Metricbeat collects system and service metrics: CPU, memory, disk, plus modules for databases, web servers, and more. It samples on an interval and ships structured metric events.

metricbeat.modules:
  - module: system
    metricsets: [cpu, memory]
    period: 10s

Other Beats

The family includes Packetbeat (network traffic), Heartbeat (uptime monitoring), Auditbeat (audit data), and Winlogbeat (Windows event logs). You pick the Beat that matches your data.

Output Destinations

Beats can ship directly to Elasticsearch for simple pipelines, or to Logstash when you need heavy parsing and enrichment before storage.

output.elasticsearch:
  hosts: ['localhost:9200']

Modules and Dashboards

Beats modules come with prebuilt parsing, index templates, and Kibana dashboards. Enabling the nginx module instantly gives you parsed access logs and ready-made visualizations.

filebeat modules enable nginx

Ingest Pipelines

When shipping straight to Elasticsearch, Beats can invoke ingest pipelines on the cluster to parse and transform data, replacing much of Logstash for simpler cases.

Back-Pressure Handling

If the output is slow or down, Beats apply back-pressure and slow their reads rather than dropping data. Filebeat keeps its position in the file until delivery is acknowledged.

Beats vs Logstash

A common architecture uses Beats at the edge for collection and Logstash centrally for transformation: Beats collect, Logstash processes, Elasticsearch stores. Use Beats alone when no heavy parsing is needed.

Elastic Agent

The newer Elastic Agent unifies multiple Beats into a single managed agent controlled by Fleet, simplifying large deployments. The underlying Beats concepts still apply.

Quick Check

Test your understanding of Beats.

Recap

You learned about lightweight data shippers:

  • Beats are small Go agents, each focused on one data type.
  • Filebeat ships logs; Metricbeat ships metrics; others cover network, uptime, and Windows events.
  • Beats output to Elasticsearch or Logstash and ship prebuilt modules and dashboards.
  • They apply back-pressure to avoid data loss, and Elastic Agent unifies them under Fleet.

常见问题解答

「用于轻量级数据传输的 Beats」课时是免费的吗?

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

「用于轻量级数据传输的 Beats」这节课中我会学到什么?

了解 Beats 这一轻量级数据传输器家族,它们以极小的资源占用将日志、指标和其他数据发送到 Elasticsearch 或 Logstash。 你通过在浏览器中直接运行的动手代码来练习 Elasticsearch & Full Text Search Systems,全天候 AI 导师会在你学习这节课的过程中回答你的问题。

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

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

「用于轻量级数据传输的 Beats」课时需要多长时间?

大多数 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