ELK入门

2023-11-14

参考

https://www.elastic.co/cn/products/

[root@server1 6.6]# ls
apm-server-6.6.1-x86_64.rpm    kibana-6.6.1-x86_64.rpm
auditbeat-6.6.1-x86_64.rpm     Kibana_Hanization-master.zip
elasticsearch-6.6.1.rpm        logstash-6.6.1.rpm
elasticsearch-head-master.zip  metricbeat-6.6.1-x86_64.rpm
filebeat-6.6.1-x86_64.rpm      nodejs-9.11.2-1nodesource.x86_64.rpm
heartbeat-6.6.1-x86_64.rpm     packetbeat-6.6.1-x86_64.rpm
journalbeat-6.6.1-x86_64.rpm   rh-nodejs8-npm-5.3.0-8.6.0.1.el7.x86_64.rpm

 

server1

yum install jdk-8u171-linux-x64.rpm  -y

 yum install elasticsearch-6.6.1.rpm -y

 

 

[root@server1 6.6]# cd /etc/elasticsearch/

[root@server1 elasticsearch]# vim elasticsearch.yml

cluster.name: my-es
node.name: server1

bootstrap.memory_lock: true

network.host: 172.25.11.1

http.port: 9200

[root@server1 elasticsearch]# grep -v ^#  elasticsearch.yml
cluster.name: my-es
node.name: server1
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
bootstrap.memory_lock: true
network.host: 172.25.11.1
http.port: 9200

 

因为之前打开了锁定内存,所以需要修改内存

[root@server1 elasticsearch]# vim /etc/security/limits.conf

末尾加入

elasticsearch soft memlock unlimited
elasticsearch hard memlock unlimited

elasticsearch - nofile 65536

elasticsearch - nproc 4096

 

[root@server1 elasticsearch]# systemctl restart elasticsearch

vim   /usr/lib/systemd/system/elasticsearch.service

# Specifies the maximum file descriptor number that can be opened by this process
LimitNOFILE=65536
LimitMEMLOCK=infinity

 

 

systemctl daemon-reload

systemctl restart elasticsearch

[root@server1 elasticsearch]# netstat -tnapl |grep 92
tcp6       0      0 172.25.11.1:9200        :::*                    LISTEN      2009/java           
tcp6       0      0 172.25.11.1:9200        172.25.11.250:34446     ESTABLISHED 2009/java

sysctl -a | grep vm.max_map_count

[root@server1 elasticsearch]# sysctl -a | grep vm.max_map_count
vm.max_map_count = 262144

 

[root@server1 elasticsearch]# curl -XGET http://172.25.11.1:9200/_cat/health?v
epoch      timestamp cluster status node.total node.data shards pri relo init unassign pending_tasks max_task_wait_time active_shards_percent
1555121341 02:09:01  my-es   green           1         1      0   0    0    0        0             0                  -                100.0%

 

[root@server1 elasticsearch]# curl -XGET http://172.25.11.1:9200/_cat/nodes?v
ip          heap.percent ram.percent cpu load_1m load_5m load_15m node.role master name
172.25.11.1           12          95   1    0.00    0.02     0.11 mdi       *      server1

[root@server1 elasticsearch]# curl -XGET http://172.25.11.1:9200/_cat/nodes
172.25.11.1 12 95 0 0.00 0.02 0.11 mdi * server1

 

使用  (githup下载的)

[root@server1 6.6]# yum install -y nodejs-9.11.2-1nodesource.x86_64.rpm

 

bunzip2 phantomjs-2.1.1-linux-x86_64.tar.bz2

tar xf phantomjs-2.1.1-linux-x86_64.tar

cd phantomjs-2.1.1-linux-x86_64

npm install --registry=https://registry.npm.taobao.org

 

unzip  elasticsearch-head-master.zip

cd elasticsearch-head-master

虚拟机需要联网

[root@server1 elasticsearch-head-master]# vim /etc/elasticsearch/elasticsearch.yml

http.cors.enabled: true
http.cors.allow-origin: '*'

 

systemctl restart elasticsearch

[root@server1 elasticsearch-head-master]# npm install --registry=https://registry.npm.taobao.org

npm run start &

 

server2  3  都需要2G以上内存

yum install jdk-8u171-linux-x64.rpm -y

yum install -y elasticsearch-6.6.1.rpm

/usr/lib/systemd/system/elasticsearch.service

# Specifies the maximum file descriptor number that can be opened by this process
LimitNOFILE=65536
LimitMEMLOCK=infinity

 

vim /etc/elasticsearch/elasticsearch.yml

discovery.zen.ping.unicast.hosts: ["server1", "server2", "server3"]

scp -rp /etc/elasticsearch/elasticsearch.yml  server2:/etc/elasticsearch/elasticsearch.yml

scp -rp /etc/elasticsearch/elasticsearch.yml  server3:/etc/elasticsearch/elasticsearch.yml

再修改server2 3  的   node   host

node.name: server2

network.host: 172.25.11.2

 

 

systemctl daemon-reload

systemctl start elasticsearch

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

ELK入门 的相关文章

随机推荐

  • C语言学习记录-C语言内置类型以及strlen获取长度原则

    C语言内置类型 1 整型int short long long long unsigned int unsigned short unsigned long 2 浮点型float float double long double 3 字符型
  • vue3前端页面添加水印

    在页面中 往往会添加水印来展示一些信息 例如在一些页面中加上自己特有的信息 使得别人在截图转发时也能看到这些信息 又好比一家公司的内部系统 可以在页面添加访问者的水印 使得用户在截图转发敏感信息之后 通过截图中的水印可以追寻到泄露信息之人
  • myBatis测试条件查询,条件参数为中文取不到数据

    在用myBatis做模糊查询的时候 发现当传入参数为中文时 就算数据库中有符合条件的数据 但取出的也是空的 但将查询参数变成英文或数字后 又可以正常查询 解决办法 因数据库采用utf 8编码 所以在修改数据库配置文件 加上编码 就可以正常查
  • PyTorch 笔记 (三)

    AutoGrad 自动求导机制 import pandas as pd import torch import torch nn as nn import numpy as np from torch autograd import Var
  • python中0x是什么意思_弱问下,以0x开头的数值表示什么意思?

    展开全部 16进制 不论多少进制 e5a48de588b63231313335323631343130323136353331333431363564每一位数值对应一个权 如0x54 个位数4的权为16的零次方 十位上的数5的权为16的1次
  • 当倚天剑遇到屠龙刀 VQGAN-CLIP 介绍

    论文地址 VQGAN CLIP Open Domain Image Generation and Editing with Natural Language Guidance VQGAN CLIP 是一种基于 VQGAN 和 CLIP Co
  • 用python做一个小项目,python做简单小项目

    大家好 本文将围绕用python做一个小项目展开说明 python做简单小项目是一个很多人都想弄明白的事情 想搞清楚python入门小项目需要先了解以下几个事情 来源丨网络 经常听到有朋友说 学习编程是一件非常枯燥无味的事情 其实 大家有没
  • HDU 1016(素数环 深搜)

    题意是说对一个长度为 n 的数环进行排列 使得相邻两数的和为素数 按从小到大的顺序依次输出 因为是环 所以总能调整成以 1 为序列首输出 用深度优先搜索的方法即可 在判断素数时由于 n 小于 20 所以两数的和小于 40 则只要手写小于 4
  • 【算法学习】【图像增强】【Retinex】White Patch Retinex

    转自 http blog 163 com yuyang tech blog static 21605008320130910480689
  • 基于jQuery slide插件的轮播大图,带标题及简介,附源码

    转自 哈喽吕小强的技术博 http www lvhongqiang com blog421 html 1 首先看效果 演示地址 http www lvhongqiang com blog421 html 2 源码 1 index html
  • idea :不支持发行版本11问题

    11修改为 本地安装的9
  • Sql Server数据库语言设置

    数据库 安全性 用户名属性 默认语言选择对应语言即可
  • 三剑客

    https blog csdn net liushengxi root article details 72810319
  • 数学建模算法汇总(全网最全,含matlab案例代码)

    数学建模常用的算法分类 全国大学生数学建模竞赛中 常见的算法模型有以下30种 最小二乘法 数值分析方法 图论算法 线性规划 整数规划 动态规划 贪心算法 分支定界法 蒙特卡洛方法 随机游走算法 遗传算法 粒子群算法 神经网络算法 人工智能算
  • Twitter账号优化:吸引更多关注与互动

    创建Twitter账号并进行优化 优化你的 Twitter 个人数据有助于提高企业的可视性并促进与用户的互动 通过与其他社交媒体页面的相互协调 你还可以建立一个专业且一致的品牌形象 创建一个标准的 Twitter 个人数据非常简单 但为了优
  • C——循环结构

    循环结构 1 while循环 2 do while语句 3 for循环 4 break与continue 4 1 break语句 4 2 continue语句 5 嵌套循环 1 while循环 形式 while 条件 语句 执行过程 先判断
  • VSCode中Python环境配置、虚拟环境的创建启动关闭及pip常用命令

    文章目录 工具准备 虚拟环境 pip常用命令 ipykernel库安装 Python迁移项目时有第三方库的做法 pip安装升级相关命令 用pip下载指定版本的包 Python相关包的介绍 1 numpy 参考资料 工具准备 安装 Visua
  • 【python】爬虫实操 完整案例 -- 豆瓣前250电影输出为 .xls文件

    安装包 from bs4 import BeautifulSoup 网页解析 import re 正则表达式 import urllib request urllib error 制定url 获取网页数据 import xlwt 进行exc
  • 微前端运行时

    目录 微前端运行时 基于 SPA 的微前端架构 应用生命周期 微前端运行时 谈到微前端绕不开的话题就是为什么不适用 iframe 作为承载微前端子应用的容器 其实从浏览器原生的方案来说 iframe 不从体验角度上来看几乎是最可靠的微前端方
  • ELK入门

    参考 https www elastic co cn products root server1 6 6 ls apm server 6 6 1 x86 64 rpm kibana 6 6 1 x86 64 rpm auditbeat 6