elk日志监控平台搭建

elk日志监控平台搭建

版本:6.1.3

  1. jdk 安装(略)

  2. kibana 安装

     tar xvzf kibana-6.1.3-linux-x86_64.tar.gz
     启动 : ./bin/kibana
     验证: http://localhost:5601
     后台启动: ./bin/kibana &
     exit退出
    
  3. elasticsearch 安装
    tar xvzf elasticsearch-6.1.3.tar.gz
    修改配置文件 vim elasticsearch.yml
    network.host:0.0.0.0
    启动: ./bin/elasticsearch -d #-d为后台启动
    验证: http://ip:9200

     报错:max file descriptors [65535] for elasticsearch process is too low, increase to at least [65536]
     
     编辑 /etc/security/limits.conf
     追加:* soft nofile 65536
     	  * hard nofile 131072
     	  * soft nproc 2048
     	  * hard nproc 4096
     	  
     报错: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
     
     编辑: /etc/sysctl.conf
     追加:vm.max_map_count=655360
     保存后,执行:
     	  sysctl -p
    
  4. logstash 安装
    unzip logstash-6.1.3.zip
    修改配置:vi config/jvm.options
    -Xms6g (运行内存,具体多大视配置而定)
    -Xmx6g
    新建 logstash.conf 文件(文件名自定义)
    插件内容(更多内容参照官网):
    input {
    file {
    path => “/usr/local/src/open_falcon/alarm/logs/*.log”
    start_position => “beginning” #定义文件读取的位置
    }
    }

     	output {
     		# 输出到 elasticsearch
     		elasticsearch {
     		   hosts => ["192.168.31.128:9200"]
     		   index => "test_elk"
     	   }
     		#输出到文件
     		#file {
     		#       path => "/usr/local/test.log"
     		#}
    
     	}
    
     启动:bin/logstash -f logstash.conf
    
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值