ubuntu

filebeat在ubuntu上的插件怎么安装

小樊
57
2025-08-20 05:05:25
栏目: 智能运维

在Ubuntu上安装Filebeat插件,通常可先安装Filebeat,再根据需求配置不同类型的插件,以下是具体步骤:

安装Filebeat

  1. 更新系统包:sudo apt update
  2. 添加Elastic官方GPG密钥和APT仓库(以Elastic 8.x为例):
    • sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
    • wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg
    • echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-8.x.list
    • sudo apt update
  3. 安装Filebeat:sudo apt install -y filebeat

配置插件

以常见的Elasticsearch、Logstash和Kafka输出插件为例:

启用插件

配置完成后,重启Filebeat服务使插件生效:sudo systemctl restart filebeat

0
看了该问题的人还看了