ELK5+redhat7.4配置elasticsearch集群
ELK介绍
ELK是三个开源软件的缩写,即elasticsearch、logstack、kibana。
Elasticsearch:开源分布式搜索引擎,提供搜集、分析、存储数据三大功能。它的特点有:分布式,零配置,自动发现,索引自动分片,索引副本机制,restful风格接口,多数据源,自动搜索负载等。(搜索引擎)
Logstash:主要是用来日志的搜集、分析、过滤日志的工具,支持大量的数据获取方式。一般工作方式为c/s架构,client端安装在需要收集日志的主机上,server端负责将收到的各节点日志进行过滤、修改等操作在一并发往elasticsearch上去。(日志搜集器)
Kibana :一个开源和免费的工具,Kibana可以为 Logstash 和 ElasticSearch 提供的日志分析友好的 Web 界面,可以帮助汇总、分析和搜索重要数据日志。(可视化)
利用ELK可替代原始的MySQL/Oracle + ECharts方案,极大减少人工成本。
背景
elasticsearch-5.5.2 rpm 包

5台机器搭建,IP分别为:
192.168.33.232 node4
192.168.33.233 node5
192.168.33.235 node7
192.168.33.236 node8
192.168.33.230 node11
其中 node4为主节点,结构为1主5从。
硬件:4C6G
软件:redhat7.4 jdk1.8.0_144
1. 系统设置(5台机器统一)
sed -e '$a vm.max_map_count = 262144' -i /etc/sysctl.conf
sysctl -p
echo "ulimit -SHn 1048576" >> /etc/rc.local
sed -e '$a DefaultLimitCORE=infinity\nDefaultLimitNOFILE=1048576\nDefaultLimitNPROC=1048576' -i /etc/systemd/system.conf
cat >> /etc/security/limits.conf << EOF
* soft nofile 1048576
* hard nofile 1048576
* soft nproc 1048576
* hard nproc 1048576
EOF
sed -i 's/4096/1048576/' /etc/security/limits.d/20-nproc.conf
sed -e '/root soft nproc unlimited/a\* soft nofile 1048576\n* hard nofile 1048576' -i /etc/security/limits.d/20-nproc.conf
- 修改elasticsearch.yml文件
192.168.33.232 node4
#-----
cluster.name: es-application
node.name: node-1 #其他节点用另外的名称
network.host: 192.168.33.232 #其他节点写上对应的ip
http.port: 9200
http.cors.enabled: true
http.cors.allow-origin: "*"
node.master: true #其他节点改成false
node.data: true
discovery.zen.ping.unicast.hosts: ["192.168.33.232", "192.168.33.233","192.168.33.235","192.168.33.236","192.168.33.230"]#其他节点也写这个ip
bootstrap.system_call_filter: false
#----
192.168.33.233 node5
#-----
cluster.name: es-application
node.name: node-2 #其他节点用另外的名称
network.host: 192.168.33.233 #其他节点写上对应的ip
http.port: 9200
http.cors.enabled: true
http.cors.allow-origin: "*"
node.master: true #其他节点改成false
node.data: true
discovery.zen.ping.unicast.hosts: ["192.168.33.232", "192.168.33.233","192.168.33.235","192.168.33.236","192.168.33.230"]#其他节点也写这个ip
bootstrap.system_call_filter: false
#----
192.168.33.235 node7
#-----
cluster.name: es-application
node.name: node-3 #其他节点用另外的名称
network.host: 192.168.33.235 #其他节点写上对应的ip
http.port: 9200
http.cors.enabled: true
http.cors.allow-origin: "*"
node.master: true #其他节点改成false
node.data: true
discovery.zen.ping.unicast.hosts: ["192.168.33.232", "192.168.33.233","192.168.33.235","192.168.33.236","192.168.33.230"]#其他节点也写这个ip
bootstrap.system_call_filter: false
#----
192.168.33.236 node8
#-----
cluster.name: es-application
node.name: node-4 #其他节点用另外的名称
network.host: 192.168.33.236 #其他节点写上对应的ip
http.port: 9200
http.cors.enabled: true
http.cors.allow-origin: "*"
node.master: true #其他节点改成false
node.data: true
discovery.zen.ping.unicast.hosts: ["192.168.33.232", "192.168.33.233","192.168.33.235","192.168.33.236","192.168.33.230"]#其他节点也写这个ip
bootstrap.system_call_filter: false
#----
192.168.33.230 node11
#-----
cluster.name: es-application
node.name: node-5 #其他节点用另外的名称
network.host: 192.168.33.230 #其他节点写上对应的ip
http.port: 9200
http.cors.enabled: true
http.cors.allow-origin: "*"
node.master: true #其他节点改成false
node.data: true
discovery.zen.ping.unicast.hosts: ["192.168.33.232", "192.168.33.233","192.168.33.235","192.168.33.236","192.168.33.230"]#其他节点也写这个ip
bootstrap.system_call_filter: false
#----
至此,超级简单版本的elasticsearch1主5从的分布式集群搭建完毕。
测试:
-->查看集群监看状态
curl '192.168.33.232:9200/_cat/health?v'
-->查看集群节点
curl '192.168.33.232:9200/_cat/nodes?v'
-->查看所有索引
curl '192.168.33.232:9200/_cat/indices?v'
界面:

ELK5+redhat7.4配置elasticsearch集群的更多相关文章
- 配置 Elasticsearch 集群
Elasticsearch 的安装非常简单,笔者在前文<单机部署 ELK>中已经介绍过了,本文主要介绍集群的配置,并解释常见配置参数的含义. 要配置集群,最简单的情况下,设置下面几个参数就 ...
- ES2:ElasticSearch 集群配置
ElasticSearch共有两个配置文件,都位于config目录下,分别是elasticsearch.yml和logging.yml,其中,elasticsearch.yml 用来配置Elastic ...
- Elasticsearch集群搭建教程及生产环境配置
Elasticsearch 是一个极其强大的搜索和分析引擎,其强大的部分在于能够对其进行扩展以获得更好的性能和稳定性. 本教程将提供有关如何设置 Elasticsearch 集群的一些信息,并将添加一 ...
- 我的ElasticSearch集群部署总结--大数据搜索引擎你不得不知
摘要:世上有三类书籍:1.介绍知识,2.阐述理论,3.工具书:世间也存在两类知识:1.技术,2.思想.以下是我在部署ElasticSearch集群时的经验总结,它们大体属于第一类知识“techknow ...
- 01篇ELK日志系统——升级版集群之elasticsearch集群的搭建
[ 前言:以前搭了个简单的ELK日志系统,以我个人的感觉来说,ELK日志系统还是非常好用的.以前没有弄这个ELK日志系统的时候,线上的项目出了bug,报错了,要定位错误是什么,错误出现在哪个java代 ...
- Ubuntu 14.04中Elasticsearch集群配置
Ubuntu 14.04中Elasticsearch集群配置 前言:本文可用于elasticsearch集群搭建参考.细分为elasticsearch.yml配置和系统配置 达到的目的:各台机器配置成 ...
- Elasticsearch集群配置以及REST API使用
ES安装与启动 在官网下载压缩包,解压后直接运行bin目录下的.bat文件即可.下载地址戳这里. ES配置集群 Elasticsearch配置集群很简单,只要配置一个集群的 名称 ,ES就会自动寻找并 ...
- elasticsearch 集群配置
2015-10-10 09:56 by 轩脉刃, 999 阅读, 1 评论, 收藏, 编辑 elasticsearch 集群 搭建elasticsearch的集群 现在假设我们有3台es机器,想要把他 ...
- Elasticsearch集群节点配置详解
注意:如果是在局域网中运行elasticsearch集群也是很简单的,只要cluster.name设置一致,并且机器在同一网段下,启动的es会自动发现对方,组成集群. 2.elasticsearch- ...
随机推荐
- python的类属性、实例属性、类方法、静态方法
类属性 就像如下代码: class Person: name = "张三" # 共有类属性 __age = 18 # 私有类属性 在类中直接定义的属性就是类属性,它被所有的实例对象 ...
- MySQL中的索引优化
MySQL中的SQL的常见优化策略 MySQL中的索引优化 MySQL中的索引简介 过多的使用索引将会造成滥用.因此索引也会有它的缺点.虽然索引大大提高了查询速度,同时却会降低更新表的速度,如对表进行 ...
- Codeforces - 1203D2 - Remove the Substring (hard version) - 双指针
https://codeforces.com/contest/1203/problem/D2 上次学了双指针求两个字符串之间的是否t是s的子序列.但其实这个双指针可以求出的是s的前i个位置中匹配t的最 ...
- c# 动态加载和卸载DLL程序集
原文:c# 动态加载和卸载DLL程序集 在 C++中加载和卸载DLL是一件很容易的事,LoadLibrary和FreeLibrary让你能够轻易的在程序中加载DLL,然后在任何地方卸载.在 C#中我们 ...
- python初始装饰器
python装饰器: 一,函数名的运用. 函数名是一个变量,但他是一个特殊的变量与括号配合可以执⾏行行函数的变量 1.函数名的内存地址 def func(): print("呵呵" ...
- 如何写一个 Burp 插件
Burp 是 Web 安全测试中不可或缺的神器.每一个师傅的电脑里面应该都有一个 Burp.同时 Burp 和很多其他神器一样,它也支持插件.但是目前总体来说网上 Burp 插件开发的资料不是特别特别 ...
- cherrypy
十多年来,Web 程序设计人员一直使用 CGI 将应用程序连接到 Web 服务器和另一端的 Web 浏览器.有很多理由建议使用 CGI:它可以与任何编程语言一起使用,并且它在 Web 服务器和宿主服务 ...
- xcode中进行git代码管理
http://www.cocoachina.com/ios/20140524/8536.html
- Spring Boot自动配置总结
Spring Boot项目启动的时候加载主配置类,并开启了自动配置功能.(Spring Boot的自动配置功能是Spring Boot的一大重要且突出的特性) 那么我们需要了解下它: 如何加载主配置类 ...
- shell编程注意点
1.标准输入输出转存不能随便用,例如: echo "export PATH=/home/huangmr/jdk/bin:\$PATH" >> /home/huangmr ...