elk 日志平台 尝鲜

创建用户组  groupadd elsearch
创建用户    useradd elsearch -g elsearch -p 123456

用户切换:     su elsearch
启动          sh xxx/elsearch目录/bin/  &

elasticsearch启动常见错误 https://www.jianshu.com/p/365db8b181cc

 

修改系统配置文件

vi /etc/security/limits.conf 
* soft nofile 65536
* hard nofile 131072
* soft nproc 2048
* hard nproc 4096
配置生效:重新连接

vi /etc/sysctl.conf 
vm.max_map_count = 655360
配置生效:执行 sysctl -p 

 

elasticsearch.yml
最后增加
network.host: 0.0.0.0
http.port: 9200
http.cors.enabled: true
http.cors.allow-origin: "*"

取消注释保留一个节点
cluster.initial_master_nodes: ["node-1"]


最后可以启动后
CentOS7查看和关闭防火墙 https://blog.csdn.net/ytangdigl/article/details/79796961
查看防火墙状态
firewall-cmd --state

停止firewall
systemctl stop firewalld.service

禁止firewall开机启动
systemctl disable firewalld.service 


启动: ./kibana --allow-root &
kibana-6.4.2-linux-x86_64/config/ kibana.yml
添加
server.host: 0.0.0.0

启动:    ./logstash -f ../config/logstash.conf &
添加配置文件  logstash.conf
input {
     file {
        type => "log"
        path => "/logs/*.log"
        start_position => "beginning"
    }
}

output {
  stdout {
   codec => rubydebug { }
  }

  elasticsearch {
    hosts => "127.0.0.1"
    index => "log-%{+YYYY.MM.dd}"
  }
}

删除索引熟悉 _index
curl -XDELETE "http://127.0.0.1:9200/索引名称" 

 

kibana设置

系统时间 YYYY-MM-D HH:mm:ss.SSS

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值