Centos7 install ELK and centos7 install elk1. Overview
ELK Introduction ELK is short for Elasticsearch + Logstash + Kibana:Elasticsearch is a Lucene-based search server. It provides a distributed full-text search engine with multi-user capabilities, developed based on javaLogstash is a tool for receiving, processing, and forwarding logs.Kibana is a browser-based front-end Elasticsearch display tool. Kibana is all written in HTML and Javascript.
Operating system version
cat /etc/redhat-releas
shutdownnode.close();Another common use is to start node and then use the Client for unit/integration testing. In this case, we should start a "local" node. This is just a simple setting to start node. Note that "local" means running on the local JVM. Two local services running on the same JVM can discover each other and form a cluster.import static org.elasticsearch.node.NodeBuilder.*;// on startupNode node = nodeBuilder().local(true).node();Client client = node.client();// on shutdownnode.clo
Centos7 uses the firewall: lt; 1 gt; for example, to query whether port 9200 is opened by the following command: firewall-cmd -- query-port = 9200/tcp, return yes, indicating to open lt; 2 gt; run the following command to open port 9300: firewall-cmd -- add-p
Centos 7 adopts the firewall:
Command: firewall-cmd -- query-port = 9200/tcp
Yes indicates opening
Command: firewall-cmd -- add-port = 9300/tcp
/plugins14. Plugin hosting location, if one of the plugins in the list is not installed, the node will not start:Plugin.mandatory:mapper-attachments,lang-groovyWhen the JVM starts swapping, Elasticsearch does not perform well: you need to protect the JVM from swapping, and you can set Bootstrap.mlockall to true to disallow swapping:Bootstrap.mlockall:trueMake sure that the values for the Es_min_mem and Es_max_mem are the same, and that you can allocate enough intrinsic to the elasticsearch and l
configurable and flexible to configure.Interface:provides two sets of API interfaces based on whether or not to use Java,elasticsearch: JAVA API and RESTful API.Two built-in clients are available for Java Api,elasticsearch:
node Client: The node client joins the cluster with no data node (none), in other words, it does not store any data itself, but it knows where the data is in the cluster and is able to forward the request directly to the corresponding node.
Transport clients (T
: Path.plugins:/path/to/plugins14. Plugin hosting location, if one of the plugins in the list is not installed, the node will not start: Plugin.mandatory:mapper-attachments,lang-groovyWhen the JVM starts swapping, Elasticsearch does not perform well: you need to protect the JVM from swapping, and you can set Bootstrap.mlockall to True to disable swapping: Bootstrap.mlockall:trueMake sure that the values for the Es_min_mem and Es_max_mem are the same, and that you can allocate enough intrinsic to
Problem: Normal access during intranet testing, but deployed to extranet client connection Elasticsearch error: None of the configured nodes is available: []Cause: By default, Elasticsearch uses the 0.0.0.0 address and opens Port 9200-9300 for the HTTP transport, opens port 9300-9400 for node-to-node communication, deploys to the external network to modify the ELASTICSEARCH.YML configurationOperation:Modify
to 0.0.0.0. network.publish_host:192.168.0.1 Set the other node and the IP address of the node interaction, if not set it will automatically determine that the value must be a real IP address. network.host:192.168.0.1 This parameter is used to set both Bind_host and Publish_host above two parameters. transport.tcp.port:9300 Set the TCP port for interaction between nodes, which is 9300 by default. Transport
node name " Es-node1"# set up a custom port for communication between nodes (default is 9300) # Set the custom side to listen for HTTP transmissions (default is 9200)http.port:9200 Elasticsearch configuration file description See: http://blog.csdn.net/an74520/article/details/101756033. Install the head plugin# Enter the node bin path [[email protected] bin] # pwd/export/search/elasticsearch-cluster/elasticsearch-node1/bin installa
SpringBoot integrates Elasticsearch and implements CRUD operations.
Configuration preparation
Add the following dependency to the build. gradle file:
Compile "org. elasticsearch. client: transport: 5.5.2 "compile" org. elasticsearch: 5.5.2 "// es 5. the apache log4 log compile "org. apache. logging. log4j: log4j-core: 2.7 "compile" org. apache. logging. log4j: log4j-api: 2.7"
Spring boot uses version 1.5.4. The official version of spring boot 2 was released the last day. One of the new features
[From] Http://www.tuicool.com/articles/JBvQrmjThis article explains how to use ElasticSearch to achieve full-text search based on spring boot.Version notesThe version of Spring data ElasticSearch needs to match the spring boot, elasticSearch version.
Spring Boot Version (x)
Spring Data Elasticsearch Version (y)
Elasticsearch Version (z)
X
Y
Z
X >= 1.4.x
2.0.0
2.0.0
Environmental dependencyModify t
actual class loader), which means that two local servers are in the same JVM, forming a cluster.
Import Static org . Elasticsearch . node . Nodebuilder .*; //on Startupnode node = Nodebuilder (). local (true). Node (); Client client = Node.client ();//on Shutdownnode.close ();
Transport Client
Transportclient uses transport module to connect elasticsearch cluster remotely, it does not increase the cluster, but only has one or more initial transport addresses and communicates with the
/dashboard/index-plugins/discover/index-plugins/doc/index-plugins/kibana/index-plugins/markdow N_vis/index-plugins/metric_vis/index-plugins/settings/index-plugins/table_vis/index-plugins/vis_types/index-
Plugins/visualize/index
Okay, let's write a docker-compose.yml for easy construction.
Ports, and so on, you can modify the path of the configuration file according to your own requirements. The overall system configuration requirements are higher please select the machine with better conf
configuration problem Solution: Check the configuration files in Elasticsearch VI config/elasticsearch.yml find the following configuration:discovery.zen.ping.unicast.hosts:["192.168.**.**:9300", "192.168.**.**:9300"] in general, there is a problem with the configuration here, note the writing formatQuestion six: org.elasticsearch.transport.RemoteTransportException:Failed to deserialize exception response
Http://www.cnblogs.com/Onlywjy/p/Elasticsearch.html
Elasticsearch6.0 and head plug-in installation
1. Download and unzip Elasticsearch
2. Modify the Elasticsearch.yml file
# Cluster Name
cluster.name:my-application
# node name
node.name:node-1
# Data store directory (multiple paths separated by commas)
Path.data:/ Home/wjy/es/data
# Log directory
path.logs:/home/wjy/es/logs
#本机的ip地址
network.host:192.168.161.128
#设置集群中master节点的初始列表, these nodes can be used to automatically discov
We have started elasticsearch in the previous article, and then we can communicate with elasticsearch, such as inserting data, retrieving data, deleting data, and so on. Elasticsearch provides two ways to communicate with Java APIs and restful APIs. Java API
If you are using the Java,elasticsearch built-in two client, you can use it in your code:Node client: The node client joins a cluster as a non-data node. In other words, it doesn't have any data on its own, but he knows what data is on which
referenced to the official Docker library, which is the version of this installation 3.11.3 . docker run --name cassandra-3.11.3 -p 7000:7000 -p 7001:7001 -p 7199:7199 -p 9042:9042 -p 9160:9160 -d cassandra:3.11.32. Elasticsearch InstallationThe installation of Elasticsearch is referenced to the official Docker library, which is the version of this installation 5.5.2 . docker run --name es-5.5.2 -p 9200:9200 -p 9300:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.