es配置(注意这里不可用root用户)
一./elasticsearch/elasticsearch.yml下面
1.修改集群的名字,如果建立集群的话 名字必须统一
cluster.name: my-application
2.从节点名字
node.name: node-1
3.数据存放地
path.data: /opt/elasticsearch/data
日志存放地
path.logs: /opt/elasticsearch/data
4.网络端口,在单机的情况下可以写localhost,集群模式必须写ip
network.host: 127.0.0.1
http.port: 9200
二./etc/sysctl.conf
添加文件描述属性持久化:
vm.max_map_count=262144
三.etc/security/limits.conf
*hard nofile 65536
*soft nofile 65536
四./etc/pam.d/su
ubuntu用户需要解开注释
session required pam_limits.so
五./etc/fstab
当数据量大的时候关闭swap分区(将所有包含swap的注掉)
UUID=7fc7669c-b09e-4e4d-bad6-6f5573be876f none swap sw
启动es
./bin/elasticsearch -d 以守护进程启动
filebeat配置:
一./etc/filebeat/filebeat.yml下面
①filebeat.inputs:
-
type: log
Change to true to enable this input configuration(是否开启设备)
enabled: true
Paths that should be crawled and fetched. Glob based paths(监听的目录文件格式)
-/opt/log/.log
-/opt/log/.txt
②setup.template.settings
index.number_of_shards:1()
setup.template.overwrite: true
setup.template.enabled: true
③Kibana
host: “127.0.0.1:5601”//地址
④Elasticsearch output
hosts: [“127.0.0.1:9200”]
⑤Processors
processors:
- add_host_metadata: ~
- add_cloud_metadata: ~
kibana配置
server.port: 5601
server.host: “localhost”
elasticsearch.hosts: [“http://localhost:9200”]
本文介绍了ES、Filebeat和Kibana的配置方法。ES配置涉及elasticsearch.yml等多个文件,包括集群名、节点名、数据和日志存放地等设置;Filebeat配置在filebeat.yml中,涵盖输入、模板、Kibana和Elasticsearch输出等;Kibana配置则设置了端口、主机和Elasticsearch地址。
1110

被折叠的 条评论
为什么被折叠?



