ELK集群部署
一、基本环境
主机名 | IP地址 | 服务角色 | 主机系统 | 软件版本 |
---|---|---|---|---|
els-node1 | 192.168.119.189 | elasticsearch(搜索引擎) | Centos7.8 | elasticsearch7.6.2 |
els-node2 | 192.168.119.190 | elasticsearch(搜索引擎) | Centos7.8 | elasticsearch7.6.2 |
els-node3 | 192.168.119.191 | elasticsearch(搜索引擎) | Centos7.8 | elasticsearch7.6.2 |
logstash | 192.168.119.192 | logstash(日志处理) | Centos7.8 | logstash7.6.2 |
kibana | 192.168.119.193 | kibana(界面展示) | Centos7.8 | kibana7.6.2 |
web | 192.168.119.194 | filebeat(日志收集) | Centos7.8 | filebeat7.6.2 |
1. 基本环境配置
-
主机名配置
-
IP地址配置
-
关闭selinux
-
hosts文件
-
同步时间
二、elasticsearch集群
1 java环境
2 安装elasticsearch软件
3 修改jvm的配置
4 修改elasticsearch配置文件
5 启动集群
6 内存不能锁定问题
7 检查集群状态.
三、elasticsearch-head插件
1. node1安装即可
2. 安装elasticsearch-head
3. 启动elasticsearch-head
4. 修改elasticsearch主配置文件
四、测试访问
1. 测试访问elasticsearch-head提供的页面
五、logstash2
1. 安装java环境
2. 安装logstash软件
3. logstash基本使用
使用案例1:
使用案例2:
# 使用1ogstash将信息写入到elasticsearch中$ logstash -e 'input { stdin{} } output { elasticsearch { hosts=> ["192.168.119.189:9200"]} }'[INFO ] 2021-04-06 04:12:27.036 [Api Webserver] agent - Successfully started Logstash API endpoint {:port=>9600}[INFO ] 2021-04-06 04:12:28.564 [Ruby-0-Thread-5: :1] elasticsearch - Installing ILM policy {"policy"=>{"phases"=>{"hot"=>{"actions"=>{"rollover"=>{"max_size"=>"50gb", "max_age"=>"30d"}}}}}} to _ilm/policy/logstash-policywww.baidu.comwww.sina.com.cnwww.163.comwww.taobao.com
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!