Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install Logstash in SpringBoot using ELK log collection

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

SpringBoot use ELK log collection in how to install Logstash, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, hope you can gain something.

1 download Logstash

Download address on the official website: https://www.elastic.co/downloads/logstash

I uploaded it to the server locally, using 5.4.2.

Scp / Users/dalaoyang/downloads/logstash-5.4.2.tar.gz root@ip:/usr/local/tool/logstash-5.4.2.tar.gz2 decompress Logstash

Enter the upload directory to decompress Logstash

Tar-zxvf logstash-5.4.2.tar.gz3 Test Logstash

Enter the logstash-5.4.2 directory

Cd logstash-5.4.2

Here are two simple examples of testing.

3.1 simple output to console bin/logstash-e 'input {stdin {}} output {stdout {}'

As shown in the figure, the startup is successful.

Enter dalaoyang, as shown below

Read the file output to Redisinput {file {type = > "test_log" path = > ["/ Users/dalaoyang/logs/my.log"] start_position = > "beginning" sincedb_path = > "/ dev/null"}} filter {if [type] = = 'test_log' {multiline {pattern = > "^% {TIMESTAMP_ISO8601}" negate = > true what = > previous } output {if [type] = = "test_log" {redis {host = > "ip" port = > "6379" data_type = > "list" key = > "log" # redis password password = > "123456"} # stdout {codec = > rubydebug}}

Start the file location configured above the command bin/logstash-f

such as

Bin/logstash-f logstash.conf

Install the multiline parsing plug-in logstash-filter-multiline

Is it helpful for logstash-plugin install logstash-filter-multiline to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report