阅读量:2
在Ubuntu上安装Filebeat插件,通常可先安装Filebeat,再根据需求配置不同类型的插件,以下是具体步骤:
安装Filebeat
- 更新系统包:
sudo apt update。 - 添加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。
- 安装Filebeat:
sudo apt install -y filebeat。
配置插件
以常见的Elasticsearch、Logstash和Kafka输出插件为例:
- Elasticsearch输出插件:编辑
/etc/filebeat/filebeat.yml,添加output.elasticsearch: hosts: ["localhost:9200"],还可根据需要添加index、username、password等配置。 - Logstash输出插件:在
filebeat.yml中配置output.logstash: hosts: ["localhost:5044"],如需认证则添加相应信息。 - Kafka输出插件:配置
output.kafka: hosts: ["kafka:9092"],并设置topic、required_acks、compression等参数。
启用插件
配置完成后,重启Filebeat服务使插件生效:sudo systemctl restart filebeat。
以上就是关于“filebeat在ubuntu上的插件怎么安装”的相关介绍,筋斗云是国内较早的云主机应用的服务商,拥有10余年行业经验,提供丰富的云服务器、租用服务器等相关产品服务。云服务器资源弹性伸缩,主机vCPU、内存性能强悍、超高I/O速度、故障秒级恢复;电子化备案,提交快速,专业团队7×24小时服务支持!
简单好用、高性价比云服务器租用链接:https://www.jindouyun.cn/product/cvm