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 log collection system flume under Linux

2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article is about how to install the log collection system flume under Linux. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Flume is a distributed, reliable and highly available system for massive log collection, aggregation and transmission, which is widely used in the actual development environment.

Environment description:

Operating system: CentOS6.9 64 bit

Decompress:

Tar-xzvf apache-flume-1.7.0-bin.tar.gz

Create a soft link:

Ln-s / opt/modules/apache-flume-1.6.0-cdh6.9.3-bin/ / opt/shortcut/flume

Environment variables are no longer added here

Modify the flume-env.sh configuration file:

# change the name mv flume-env.sh.template flume-env.shvim flume-env.sh# first and add JAVA_HOMEexport JAVA_HOME=/usr/java/default

Create a configuration file, which uses an example given on the official website

The content of vim test.conf# is as follows: # example.conf: a single-node Flume configuration# Name the components on this agent# defines an element of agent a1.sources = r1a1.sinks = k1a1.channels = clocked Describe/configure the source# configuration sourcea1.sources.r1.type = netcata1.sources.r1.bind = localhosta1.sources.r1.port = 4444 configured Describe the sink# configuration sinka1.sinks.k1.type = logger# Use a channel which buffers events in memory# definition channela1.channels .c1.type = memorya1.channels.c1.capacity = 1000a1.channels.c1.transactionCapacity = 10 Bind the source and sink to the channel# connect source with channel and sinka1.sources.r1.channels = c1a1.sinks.k1.channel = C1

Install telnet:

Yum install telnetyum install telnet-serveryum install xinetd

Restart telnet:

Service xinetd restart

Start flume:

Bin/flume-ng agent-conf conf--conf-file conf/test.conf-name A1-Dflume.root.logger=INFO,console

Start telnet:

Telnet localhost 44444

Enter something in telnet:

Go to Flume to see if you have received:

You will see something like this, and maybe sometimes this line displays less content than what we enter, not because it is not received, but because it exceeds the length it can display and is omitted.

Thank you for reading! This is the end of the article on "how to install the log collection system flume under Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!

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

Development

Wechat

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

12
Report