当前位置:网站首页>Installation and use of filebeat
Installation and use of filebeat
2022-06-26 18:33:00 【cc_ nanke dream】
Filebeat It's a lightweight log transport Agent, You can forward the specified log to Logstash、Elasticsearch、Kafka、Redis Wait .Filebeat Less occupied resources , And the installation and configuration is relatively simple , Support the current mainstream OS And Docker platform .
One :Filebeat Installation and use
1、 download
Official website address :https://www.elastic.co/cn/downloads/past-releases#filebeat
2、 install
Upload and unzip

3、 go in filebeat Directory to create a configuration file
At this point, we have verified the simplest configuration


filebeat.inputs:
- type: stdin
enabled: true
setup.template.settings:
index.number_of_shards: 3
output.console:
pretty: true
enable: true 4、 Start command
./filebeat -e -c itcast.yml

5、 verification
Post-boot input hello enter , See the output at this time json For processed log data

6、 Read the file
1: modify - type: log
2: Add read file address
paths:
- /home/cc/logs/*.log

3: Start the view. The file contents have been read at this time

7、 Custom field
Two ways :
【1】:tags:["web"]
【2】:
fields:
from: cc

Start view :

fields Add directly as add to child nodes :
Add command :fields_under_root: true Is added to the root node


8、 Output to Elasticsearch
To configure :
output.elasticsearch:
hosts: ["192.168.231.146"]

verification :
9、Module Use
Use command :./filebeat modules list You can view the settings Model

Start command :./filebeat modules enable nginx
To disable the command :./filebeat modules disable nginx
To configure : Enter configuration file . To configure


Modify the configuration file
The original input type is commented out . To configure modules

边栏推荐
猜你喜欢
随机推荐
Leetcode 238 product of arrays other than itself
Deep learning: numpy
Insert string B into string A. how many insertion methods can make the new string a palindrome string
9. Intelligent transportation project (2)
Redis单点登陆系统+投票系统
交叉编译环境出现.so链接文件找不到问题
Solidity - 合约继承子合约包含构造函数时报错 及 一个合约调用另一合约view函数收取gas费用
GDB installation
System table SQLite of SQLite database_ master
知識點總結
Map和List<Map>转相应的对象
微信小程序 自定义 弹框组件
Procedure steps for burning a disc
To: Apple CEO Cook: great ideas come from constantly rejecting the status quo
带你解决哈希冲突,并实现一个简单hash表,
自己创建一个时间拦截器
VCD-影音光碟
Reading notes: process consulting III
Development principle analysis and source code of dapp-lp single and dual currency liquidity pledge mining system
Solidity - contract inheritance sub contract contains constructor errors and one contract calls the view function of another contract to charge gas fees









