Home | 简体中文 | 繁体中文 | 杂文 | 知乎专栏 | Github | OSChina 博客 | 云社区 | 云栖社区 | Facebook | Linkedin | 视频教程 | 打赏(Donations) | About
知乎专栏多维度架构 微信号 netkiller-ebook | QQ群:128659835 请注明“读者”

第 3 章 ElasticSearch + Logstash + Kibana

目录

3.1. 安装
3.1.1. 6.x
3.1.2. ElasticSearch + Logstash + Kibana 安装
3.1.2.1. ElasticSearch 安装
3.1.2.2. Kibana 安装
3.1.2.3. Logstash 安装
3.1.2.4. 从 5.x 升级到 6.x
3.2. logstash 命令简单应用
3.2.1. -e 命令行运行
3.2.2. -f 指定配置文件
3.2.3. -t:测试配置文件是否正确,然后退出。
3.2.4. -l:日志输出的地址
3.2.5. log.level 启动Debug模式
3.3. 配置 Broker(Redis)
3.3.1. indexer
3.3.2. shipper
3.4. logstash 配置项
3.4.1. input
3.4.1.1. 标准输入输出
3.4.1.2. rubydebug
3.4.1.3. 本地文件
3.4.1.3.1. 指定文件类型
3.4.1.4. TCP/UDP
3.4.1.5. Redis
3.4.1.6. Kafka
3.4.1.7. jdbc
3.4.2. filter
3.4.2.1. 日期格式化
3.4.2.2. patterns
3.4.2.3. syslog
3.4.2.4. csv
3.4.2.5. 使用ruby 处理 CSV文件
3.4.2.6. 执行 ruby 代码
3.4.2.7. grok debug 工具
3.4.3. output
3.4.3.1. stdout
3.4.3.2. file 写入文件
3.4.3.3. elasticsearch
3.4.3.3.1. 自定义 index
3.4.3.4. exec 执行脚本
3.5. Example
3.5.1. Spring boot logback
3.5.2. 索引切割实例
3.5.3.
3.5.3.1.
3.6. Beats
3.6.1. 安装 Beta
3.6.1.1. Beats 6.x 安装
3.6.1.2. Beats 5.x 安装
3.6.2. Filebeat
3.7. FAQ
3.7.1. 查看 Kibana 数据库
3.7.2. logstash 无法写入 elasticsearch
3.7.3. 标准输出
3.7.4. 5.x 升级至 6.x 的变化

官方网站 https://www.elastic.co

环境准备:

操作系统: CentOS 7

Java 1.8

Redis

ElasticSearch + Logstash + Kibana 均使用 5.2 版本

以下安装均使用 Netkiller OSCM 脚本一键安装

3.1. 安装

3.1.1. 6.x

			
curl -s https://raw.githubusercontent.com/oscm/shell/master/search/elastic/elastic-6.x.sh | bash
			
			

3.1.2. ElasticSearch + Logstash + Kibana 安装

3.1.2.1. ElasticSearch 安装

粘贴下面命令到Linux控制台即可一键安装

				
curl -s https://raw.githubusercontent.com/oscm/shell/master/search/elasticsearch/elasticsearch-5.x.sh | bash
				
				

3.1.2.2. Kibana 安装

				
curl -s https://raw.githubusercontent.com/oscm/shell/master/log/kibana/kibana-5.x.sh | bash
				
				

3.1.2.3. Logstash 安装

					curl -s https://raw.githubusercontent.com/oscm/shell/master/log/kibana/logstash-5.x.sh | bash
				

3.1.2.4. 从 5.x 升级到 6.x

升级仓库

				
curl -s https://raw.githubusercontent.com/oscm/shell/master/search/elastic/elastic-6.x.sh | bash		
				
				
				
yum update logstash