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- ...
随机推荐
- P1057传球游戏
这是一道动态规划的水题,难度为提高-. 题意为:n个人围成一个环传球,每一次都可以往左或右传,传m次,问有几种最后传到小明手里的方案数.然后因为一个状态有两个变量,所以我们用dp[][]来存储[传球次 ...
- MySQL中的索引优化
MySQL中的SQL的常见优化策略 MySQL中的索引优化 MySQL中的索引简介 过多的使用索引将会造成滥用.因此索引也会有它的缺点.虽然索引大大提高了查询速度,同时却会降低更新表的速度,如对表进行 ...
- EasyTest-接口自动化测试平台部署上线问题记录
平台url: http://easytest.xyz 花巨资搞了个阿里云服务器,哈哈,有想体验指导的大佬私聊我~~~ 部署环境 云服务器:Ubuntu Server 16.04.1 LTS 64位 ...
- Vue2 & ElementUI实现管理后台之input获得焦点
Vue.directive('focus', function (el, option) { var defClass = 'el-input', defTag = 'input'; var valu ...
- vue-cli中开发生产css注入形式不同导致bug
开发环境和生产环境不同导致的差异.主要是css层级有变动:开发环境只是单纯的使用了style-loader进行style标签插入,不进行额外的处理,比如说资源合并和添加md5后缀等,这样做是为了让编译 ...
- Verilog中的Timescale作用
很多时候,我们拿到已有的东西理所当然的用了,其实,你真的对你所使用的东西了解吗? 再次犯下这样的错误,是因为在把代码从Altera 的CycloneV移植到Xilinx的Spartan6上,我遇到了非 ...
- laravel中间件失效,配置文件重新加载
composer dump-autoload php artisan cache:clear 清理视图缓存 php atisan view:clear 清除运行缓存 php artisan cache ...
- iptable防火墙原理
iptable防火墙原理 简介 Linux 2.0 ipfs/firewalld Linux 2.2 ipchain/firewall Linux 2.4 iptables/netfilter (ip ...
- 转(HBuilder 打包流程)
1.运行HBuilder---百度搜索HBuilder,官网下载安装包,解压,运行HBuilder.exe.注册账号,并登陆 2.新建app---在左边右键,选择新建APP,或者,点击中间的新建app ...
- ul列表li元素横排显示的IE兼容性问题
目标: 使ul列表横排显示 现象: 谷歌OK,火狐竖排,IE竖排. 原因: ul原css代码: 首先,去除点号,list-style:none;为了使其横排,使用了display:contents;该 ...