ELK+Filebeat 安装配置入门
# cat /etc/issue
CentOS release 6.5 (Final)
> vim /etc/elasticsearch/elasticsearch.yml # ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
# network.host: 127.0.0.1
network.host: 192.168.20.50
#
# Set a custom port for HTTP:
#
http.port: ... bootstrap.system_call_filter: false
!使用本地 IP(127.0.0.1)时,Elasticsearch 进入 dev mode,只能从本机访问,只显示警告。
ERROR: bootstrap checks failed
max file descriptors [] for elasticsearch process likely too low, increase to at least []
memory locking requested for elasticsearch process but memory is not locked
max number of threads [] for user [jason] likely too low, increase to at least []
max virtual memory areas vm.max_map_count [] likely too low, increase to at least []
system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
需要针对这些参数进行设置:
> vim /etc/security/limits.conf
...
elasticsearch hard nofile # 针对 max file descriptors
elasticsearch soft nproc # 针对 max number of threads > vim /etc/sysctl.conf
...
vm.max_map_count= # 针对 max virtual memory areas > vim /etc/elasticsearch/elasticsearch.yml ...
bootstrap.system_call_filter: false # 针对 system call filters failed to install, 参见 https://www.elastic.co/guide/en/elasticsearch/reference/current/system-call-filter-check.html
sudo chkconfig --add elasticsearch # configure Elasticsearch to start automatically when the system boots up
sudo -i service elasticsearch start
sudo -i service elasticsearch stop
日志: /var/log/elasticsearch/
rpm -vi logstash-5.2..rpm
这个例子里使用 Filebeat 将测试用的 Apache web log 作为 logstash的输入,解析并写入数据到 ElasticSearch 中。
> vim /etc/logstash/conf.d/first-pipeline.conf input {
beats {
port => ""
}
}
filter {
grok {
match => { "message" => "%{COMBINEDAPACHELOG}"}
}
geoip {
source => "clientip"
}
}
output {
elasticsearch {
hosts => [ "192.168.20.50:9200" ]
index => "testlog-%{+YYYY.MM.dd}"
}
}
grok
可以解析未结构化的日志数据,Grok filter pattern 测试网站:http://grokdebug.herokuapp.com/%{COMBINEDAPACHELOG}
%{IPORHOST:clientip} %{USER:ident} %{USER:auth}
\[%{HTTPDATE:timestamp}\] "(?:%{WORD:verb} %{NOTSPACE:request}
(?: HTTP/%{NUMBER:httpversion})?|%{DATA:rawrequest})" %{NUMBER:response}
(?:%{NUMBER:bytes}|-) %{QS:referrer} %{QS:agent}
启动:
sudo initctl start logstash // 作为服务运行,在使用Upstart的系统中
curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-5.2.0-x86_64.rpm
sudo rpm -vi filebeat-5.2.-x86_64.rpm
> vim /etc/filebeat/filebeat.yml filebeat.prospectors: - input_type: log
paths:
- /var/log/logstash-tutorial.log # 之前下载的测试文件
#- /var/log/*.log
#- c:\programdata\elasticsearch\logs\* ... #----------------------------- Logstash output --------------------------------
output.logstash:
# The Logstash hosts
#hosts: ["localhost:5044"]
hosts: ["localhost:5043"]
curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-5.2.0-x86_64.rpm
sudo rpm -vi filebeat-5.2.-x86_64.rpm
sudo /etc/init.d/filebeat start
> vim /etc/kibana/kibana.yml server.host: "192.168.20.50" elasticsearch.url: "http://192.168.20.50:9200"
> sudo chkconfig --add kibana # 设置自动启动 > sudo -i service kibana start
> sudo -i service kibana stop
echo '1.1.1.3 - - [04/Jan/2015:05:13:42 +0000] "GET /test.png HTTP/1.1" 200 203023 "http://test.com/" "Mozilla/5.0"' >> /var/log/logstash-tutorial.log
ELK+Filebeat 安装配置入门的更多相关文章
- ELK 架构之 Logstash 和 Filebeat 安装配置
上一篇:ELK 架构之 Elasticsearch 和 Kibana 安装配置 阅读目录: 1. 环境准备 2. 安装 Logstash 3. 配置 Logstash 4. Logstash 采集的日 ...
- ELK 架构之 Elasticsearch、Kibana、Logstash 和 Filebeat 安装配置汇总(6.2.4 版本)
相关文章: ELK 架构之 Elasticsearch 和 Kibana 安装配置 ELK 架构之 Logstash 和 Filebeat 安装配置 ELK 架构之 Logstash 和 Filebe ...
- ELK 6安装配置 nginx日志收集 kabana汉化
#ELK 6安装配置 nginx日志收集 kabana汉化 #环境 centos 7.4 ,ELK 6 ,单节点 #服务端 Logstash 收集,过滤 Elasticsearch 存储,索引日志 K ...
- FileBeat安装配置
在ELK中因为logstash是在jvm上跑的,资源消耗比较大,对机器的要求比较高.而Filebeat是一个轻量级的logstash-forwarder,在服务器上安装后,Filebeat可以监控日志 ...
- elk集成安装配置
三台虚拟机 193,194,195 本机 78 流程 pythonserver -> nginx -> logstash_shipper->kafka->logstash_in ...
- 转载maven安装,配置,入门
转载:http://www.cnblogs.com/dcba1112/archive/2011/05/01/2033805.html 本书代码下载 大家可以从我的网站下载本书的代码:http://ww ...
- 第二篇:Filebeat 安装配置
Filebeat 简介:Filebeat 是一款轻量型日志收集工具,可转发汇总日志.文件等内容. 其主要特点为:1. 断点续传.(如遇日志转发过程中网络 ...
- Docker: 安装配置入门[二]
一.安装配置启动 1.环境 [root@docker1 ~]# cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core) [root@d ...
- Keepalived安装配置入门
准备两台虚拟机,IP如下: A:192.168.1.11 B:192.168.1.12 A为Master,B为BackUp 1.安装 yum install keepalived -y 2.配置 A服 ...
随机推荐
- day6作业--游戏人生
本节作业: 熟练使用类和模块,写一个交互性强.有冲突的程序. 思路: 1.各个模块之间的调用关系,如何使用类,各种方法的使用上面: 2.学了类,以为能用来解决所有问题,东西都要写在类里面: 3.下面自 ...
- install vscode on centos
1.down load package from https://code.visualstudio.com/docs/?dv=linux64 2.tar zxf code-stable-code_1 ...
- mysql 触发器(Trigger)简明总结和使用实例
一,什么触发器 1,个人理解触发器,从字面来理解,一触即发的一个器,简称触发器(哈哈,个人理解),举个例子吧,好比天黑了,你开灯了,你看到东西了.你放炮仗,点燃了,一会就炸了.2,官方定义触发器(tr ...
- 14个你可能不知道的JavaScript调试技巧
调试JS的时候,搜索一下这个标题
- 基于spring-boot的应用程序的单元测试方案
概述 本文主要介绍如何对基于spring-boot的web应用编写单元测试.集成测试的代码. 此类应用的架构图一般如下所示: 我们项目的程序,对应到上图中的web应用部分.这部分一般分为Control ...
- luoguP4279 [SHOI2008]小约翰的游戏 Anti-SG 博弈论
这就是一个Anti SG问题 当整个游戏的\(sg = 0\)时,如果不存在单一游戏局面\(sg > 1\),那么先手必胜 当整个游戏的\(sg \neq 0\)时,如果至少存在一个单一游戏局面 ...
- [BZOJ5306][HAOI2018]染色(容斥+FFT)
https://www.cnblogs.com/zhoushuyu/p/9138251.html 注意如果一开始F(i)中内层式子中j枚举的是除前i种颜色之外还有几种出现S次的颜色,那么后面式子就会难 ...
- Alpha7
难受
- Git 简易使用指南及补充
Git最简易的使用指南 助你开始使用 git 的简易指南,木有高深内容,;) 安装 下载 git OSX 版 下载 git Windows 版 下载 git Linux 版 创建新仓库 创建新文件夹, ...
- bzoj 2998 第k小字串
这道题用后缀数组貌似会T. 后缀自动机做法: t==0:第k小的本质不同字串 首先把后缀自动机建出来,我们会得到一个DAG,并且只存在一个点入度为0(我们称之为根),可以证明字符串的任意一个本质不同的 ...