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 analyze ELK platform deployment

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

How to analyze the deployment of the ELK platform, in view of this problem, this article introduces the corresponding analysis and solutions in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.

The ELK deployment shared with you today is a simple open source software, which is the same as zabbix, but with different functions. Oh, yes, they call zabbix the 5 million pv-level large-scale architecture monitoring system for enterprise projects. Hand-in-hand teaching, but also encryption.

Really do not know where the courage and self-confidence, in order to promote, but also quite hard!

ELK refers to the logstash,elasticsearch,kibana three-piece set, which can make up log analysis and monitoring tools.

Today we will focus on the installation of elasticsearch:

L Elasticsearch is an open source distributed search engine, its characteristics are: distribution, zero configuration, automatic discovery, index automatic slicing, index copy mechanism, restful style interface, multiple data sources, automatic search load and so on.

Look down from the top:

The first line: API interface and support for the java language, itself is developed in java.

The second line: interactive mode, which is transmitted by default using http protocol.

The third line: automatic node discovery mechanism, zen is mainly used to achieve automatic node discovery, if master fails, other nodes will automatically elect to determine a master.

The middle of the third row is mainly used to process the queried data, and on the far right is the plug-in identification.

The fourth line is the lucene framework

Line 5: the index data storage format supported by gateway:elasticsearch.

Let's take a look at how to install:

Install JDK and uninstall it if any

Check if there is JDK on this machine.

[root@xuegod63 ~] # java-version

Java version "1.7.045"

OpenJDK Runtime Environment (rhel-2.4.3.3.el6-x86_64u45-b15)

OpenJDK 64-Bit Server VM (build 24.45, color b08, mixed mode)

Uninstall JDK

[root@xuegod63 ~] # yum remove java

Loaded plugins: product-id,refresh-packagekit, security

: subscription-manager

-- > Package java-1.6.0-openjdk.x86_641:1.6.0.0-1.66.1.13.0.el6 will be erased

-- > Package java-1.7.0-openjdk.x86_641:1.7.0.45-2.4.3.3.el6 will be erased

-> Finished Dependency Resolution

Removed:

Java-1.6.0-openjdk.x86_64 1VR 1.6.0.0-1.66.1.13.0.el6

Java-1.7.0-openjdk.x86_64 1Rank 1.7.0.45-2.4.3.3.el6

Complete!

[root@xuegod63 ~] # java-version

Bash: / usr/bin/java: there is no file or directory to prove that the uninstall was successful

Note: if still available, you can use yum grouprmove java

JDK download address http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Elasticsearch download address

Https://www.elastic.co/downloads/elasticsearch

Rz command to upload the package, if there is no rz command, use yum install lr* to install

Install JDK

[root@xuegod63 ~] # tar zxf jdk-8u111-linux-x64.tar.gz

[root@xuegod63 ~] # ls

Jdk1.8.0_111

Jdk-8u111-linux-x64.tar.gz

[root@xuegod63 ~] # cd jdk1.8.0_111/

Configure JDK

[root@xuegod63 jdk1.8.0_111] # vim / etc/profile Open a file to write red content

Export JAVA_HOME=/root/jdk1.8.0_111

Export JAVA_BIN=/root/jdk1.8.0_111/bin

Export PATH=$PATH:$JAVA_HOME/bin

ExportCLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

Export JAVA_HOME JAVA_BIN PATH CLASSPATH

Reload JDK

Reboot or source

[root@xuegod63 jdk1.8.0_111] # source / etc/profile

[root@xuegod63 jdk1.8.0_111] # java-version

Java version "1.8.0,111"

Java (TM) SE Runtime Environment (build 1.8.0_111-b14)

Java HotSpot (TM) 64-Bit Server VM (build 25.111-b14, mixedmode)

[root@xuegod63 jdk1.8.0_111] #

Install elasticserache

Decompress and run.

[root@xuegod63 ~] # tar zxf elasticsearch-5.0.0.tar.gz

[root@xuegod63 ~] # cd elasticsearch-5.0.0

[root@xuegod63 elasticsearch-5.0.0] # ls

Bin config lib LICENSE.txt modules NOTICE.txt README.textile

[root@xuegod63 elasticsearch-5.0.0] #

[root@xuegod63 elasticsearch-5.0.0] #. / bin/elasticsearch-d

-d means to let the service run in the background

How do I make sure that elasticsearch is started successfully?

Let's visit the web service address and confirm it.

Web service address

Http://localhost:9200

Note that if you are using a virtual machine, please use the IP of the virtual machine

See the following figure: proved to be successful.

This is a json format that returns the data.

Status 200indicates that it is successful.

Name: the name of the node, which is the name of the American Marvel comic book character.

In fact, as long as the java is matched, it can basically be started successfully. If the startup is not successful, you can check it in the log log.

As shown below:

This is the answer to the question on how to analyze the deployment of the ELK platform. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.

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