当前位置:网站首页>Installation and use of logstash
Installation and use of logstash
2022-06-26 18:34:00 【cc_ nanke dream】
Logstash It is a powerful data processing tool , It can realize data transmission , Format processing , Format output , There are also powerful plug-in functions , Commonly used for log processing
explain :logstash Collect diary for comparison Filebeat Very slowly , So collect diaries and use Filebeat, Don't have to logstash
One 、 download
Address :https://www.elastic.co/cn/downloads/logstash
Two 、 install
Depend on the environment :jdk1.8+
Upload and unzip the installation package
tar -xvf logstash-7.13.3-linux-x86_64.tar.gz
3、 ... and 、 verification
Get into bin perform logstash Start command , Let's go to the first logstash Example
# bin/logstash -e 'input { stdin { } } output { stdout { } }'
explain : This example is to do any processing . Output what you input .
After starting , Input hello And output
Four 、 To configure
The configuration has three parts as follows
1、input File read and filter Handle
【1】 create profile
vim itcast-log.conf
Content
input{
file{
path => "/opt/cc.log"
start_position => "beginning"
}
}
filter{
mutate {
split => {"message"=>"|"}
}
}
output{
stdout { codec => rubydebug }
}
【2】: establish cc.log, Prepare for the presentation
【3】 start-up
command :./bin/logstash -f itcast-log.conf
【4】 After startup, you will see that the log contents have been obtained , And has been processed
2、 Output to Elasticsearch
Modify profile output modular ,hosts Is an array , Cluster configuration is separated by commas , Just add .
output{
elasticsearch{
hosts => ["192.168.231.146:9200"]
}
}
stay cc.log Add a new record to
see ( View using kibana)
边栏推荐
猜你喜欢
随机推荐
System table SQLite of SQLite database_ master
MySQL download and configuration MySQL remote control
Detailed explanation of MySQL mvcc mechanism
50 lines of code to crawl TOP500 books and import TXT documents
Clion编译catkin_ws(ROS工作空间包的简称)加载CMakeLists.txt出现的问题
Microservice architecture
项目实战四:用户登录及token访问验证(reids+jwt)
To: seek truth from facts
将字符串B插入字符串A,有多少种插入办法可以使新串是一个回文串
微信小程序 自定义 弹框组件
Commodity seckill system
Filebeat安装及使用
Decompilation of zero time technology smart contract security series articles
Image binarization
Handwritten promise all
判断某个序列是否为栈的弹出序列
Deep learning: numpy
Map and filter methods for processing scarce arrays
基于tensorflow的手写数字识别
ROS query topic specific content common instructions