[Get nèng - Logstash] Beginners (a) - Logstash Profile

This series of blog is Logstash learning applications, some examples from official documents.
Reference:
official documentation
article Quick Start Logstash

I. Introduction

The official explanation:

Logstash is open source engine with real-time data collection pipelining functions. Logstash can dynamically unify data from different sources, standardize the data to the destination of your choice. Clear all data and democratize, various advanced downstream for analysis and visualization use cases.

Personal understanding:

Logstash may collect data from different sources, and the data is output to a variety of post-processing the output source, is an important part of Elastic Stack, the ELK is L. ELK refers ElasticSearch, Logstash, Kibana these three components. They are often used in conjunction, ES is responsible for storing and indexing data, Logstash responsible for the centralized, conversion and storage of data, Kibana responsible for the graphic page display.

II. Architecture principles

Chart
Here Insert Picture Description
processing
Here Insert Picture Description

Inputs Input source
It supports a variety of input sources, like a common beat, kafka, tcp, redis, and so on.
See more support https://www.elastic.co/guide/en/logstash/current/input-plugins.html

Filters filter
processing such as data format conversion, data filtering, common plugins such as grok, mutate, drop, geoip other
more support see https://www.elastic.co/guide/en/logstash/5.6/filter- plugins.html

输出Outputs
数据输出地,常见的插件如elastcisearch,file, 等
更多支持请参看https://www.elastic.co/guide/en/logstash/5.6/output-plugins.html

编码Codecs
Codes不是一个单独的流程,而是在输入和输出等插件中用于数据转换的模块,用于对数据进行编码处理,常见的插件如json,multiline等
更多支持请参看https://www.elastic.co/guide/en/logstash/5.6/codec-plugins.html

三. Hello World

1.下载安装
下载地址:传送门
解压即可(需要先安装JDK8)

2.使用启动
cd到Logstash的根目录,执行启动命令,此处使用标准输入和标准输出作为input和output
(windows用cmd终端进入)

cd logstash-6.0.0
bin/logstash -e 'input { stdin { } } output { stdout {} }'
  • -e 表示在启动时直接指定pipeline配置
  • -f 表示使用配置文件启动
  • –config.test_and_exit 选项解析配置文件并报告任何错误
  • –config.reload.automatic 选项允许自动重新加载配置,这样您就不必每次修改配置文件时都要停止并重新启动Logstash

3.测试
启动成功显示如下:
输入123,显示123
Here Insert Picture Description

4.使用配置文件启动
首先在任意目录下conf文件,我是在logstash/bin目录下创建的
std_std.conf

input {
    stdin {}

}
output {
   stdout {}
}

之后启动命令

cd logstash-6.0.0
bin/logstash -f sts_std.conf

源码地址

CLOUD-LOGSTASH-IT : LOGSTASH tutorial source code. CSDN logstash Bowen in this series.


Recommended items

CLOUD-IT : IT service management platform, integrated basic services, middleware services, alarm monitoring services.
CLOUD-ACTIVITI6-IT : the Activiti tutorial source code. CSDN Activiti Bowen in this series.
CLOUD-elasticsearch-IT : elasticsearch tutorial source code. CSDN elasticsearch Bowen in this series.
CLOUD-KAFKA-IT : the Spring integration kafka tutorial source code. Bowen in this CSDN kafka series.
-CLOUD-KAFKA-IT CLIENT : Client tutorial source Kafka used to live. Bowen in this CSDN kafka series.

Open source project, continuously updated, the Star ~ like please

Published 160 original articles · won praise 46 · Views 200,000 +

Guess you like

Origin blog.csdn.net/yy756127197/article/details/104244825