当前位置:网站首页>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

边栏推荐
- 微服务版单点登陆系统(SSO)
- redis 基础知识
- 8VC Venture Cup 2017 - Final Round C. Nikita and stack
- The eigen library calculates the angle between two vectors
- The cross compilation environment appears So link file not found problem
- Request method 'POST' not supported
- Chinese (Simplified) language pack
- [kubernetes] kubernetes principle analysis and practical application (under update)
- sqlite数据库的系统表sqlite_master
- Deep understanding of MySQL lock and transaction isolation level
猜你喜欢
随机推荐
微服务架构
知識點總結
Leetcode interview question 29 clockwise print matrix
GDB installation
How to create and enforce indexes
零时科技 | 智能合约安全系列文章之反编译篇
In and exceptions, count (*) query optimization
[unity] use C in unity to execute external files, such as Exe or bat
Deep understanding of MySQL lock and transaction isolation level
CD-CompactDisk
Enter n integers and output the number of occurrences greater than or equal to half the length of the array
Leetcode 238 product of arrays other than itself
Current limiting design and Implementation
Request method 'POST' not supported
转:苹果CEO库克:伟大的想法来自不断拒绝接受现状
Do you know how to compare two objects
转:实事求是
Convex hull problem
gdb安装
SQL中的并、交、差运算








