filebeat+logstash配置
一. filebeat.yml的配置
filebeat.prospectors:
- input_type: log
paths:
- /tmp/logs/optimus-activity-api.log
document_type: "czh-uat-activity"
multiline:
pattern: '^\s*("{)'
negate: true
match: after
max_lines: 1000
timeout: 30s
fields:
logsource: uat
logtype: czh-uat-activity
- input_type: log
paths:
- /tmp/logs/optimus-coupon-api.log
document_type: "czh-uat-coupon"
fields:
logsource: uat139.224.146.96
logtype: czh-uat-coupon
- input_type: log
paths:
- /tmp/logs/optimus-bean-api.log
document_type: "czh-uat-bean"
fields:
logsource: uat
logtype: czh-uat-bean
- input_type: log
paths:
- /tmp/logs/optimus-external-api.log
document_type: "czh-uat-external-web"
fields:
logsource: uat
logtype: czh-uat-external-web
- input_type: log
paths:
- /tmp/logs/api-gateway-production.log
document_type: "czh-uat-gateway"
fields:
logsource: uat
logtype: czh-uat-gateway
- input_type: log
paths:
- /tmp/logs/optimus-manage-api.log
document_type: "czh-uat-manage"
fields:
logsource: uat
logtype: czh-uat-manage
- input_type: log
paths:
- /tmp/logs/optimus-order-api.log
document_type: "czh-uat-api-order"
fields:
logsource: uat
logtype: czh-uat-api-order
- input_type: log
paths:
- /tmp/logs/optimus-parent-plus-api.log
document_type: "czh-uat-parent-plus"
fields:
logsource: uat
logtype: czh-uat-parent-plus
- input_type: log
paths:
- /tmp/logs/optimus-user-api.log
document_type: "czh-uat-user-production"
fields:
logsource: uat
logtype: czh-uat-user-production
将采集的日志导入logstash里
output.logstash:
hosts: ["192.168.102.38:5044"]
二. logstash的配置:
1.------input配置--------
input {
beats {
port => 5044
}
}
if [fields][logtype] == "czh-uat-activity" {
json {
source => "message"
target => "data"
}
}
if [fields][logtype] == "czh-uat-coupon" {
json {
source => "message"
target => "data"
}
}
if [fields][logtype] == "czh-uat-bean" {
json {
source => "message"
target => "data"
}
}
if [fields][logtype] == "czh-uat-external-web" {
json {
source => "message"
target => "data"
}
}
if [fields][logtype] == "czh-uat-gateway" {
json {
source => "message"
target => "data"
}
}
if [fields][logtype] == "czh-uat-manage" {
json {
source => "message"
target => "data"
}
}
if [fields][logtype] == "czh-uat-api-order" {
json {
source => "message"
target => "data"
}
}
if [fields][logtype] == "czh-uat-parent-plus" {
json {
source => "message"
target => "data"
}
}
if [fields][logtype] == "czh-uat-user-production" {
json {
source => "message"
target => "data"
}
}
-------output-配置------
if [fields][logtype] == "czh-uat-activity"{
elasticsearch {
hosts => ["192.168.102.17:9200","192.168.102.26:9200"] #将处理后的日志存储到 elasticsearch,多个IP是因为做了集群
index => "czh-uat-activity" #创建索引
}
}
if [fields][logtype] == "czh-uat-coupon"{
elasticsearch {
hosts => ["192.168.102.17:9200","192.168.102.26:9200"]
index => "czh-uat-coupon"
}
}
if [fields][logtype] == "czh-uat-bean"{
elasticsearch {
hosts => ["192.168.102.17:9200","192.168.102.26:9200"]
index => "czh-uat-bean"
}
}
if [fields][logtype] == "czh-uat-external-web"{
elasticsearch {
hosts => ["192.168.102.17:9200","192.168.102.26:9200"]
index => "czh-uat-external-web"
}
}
if [fields][logtype] == "czh-uat-gateway"{
elasticsearch {
hosts => ["192.168.102.17:9200","192.168.102.26:9200"]
index => "czh-uat-gateway"
}
}
if [fields][logtype] == "czh-uat-manage"{
elasticsearch {
hosts => ["192.168.102.17:9200","192.168.102.26:9200"]
index => "czh-uat-manage"
}
}
if [fields][logtype] == "czh-uat-api-order"{
elasticsearch {
hosts => ["192.168.102.17:9200","192.168.102.26:9200"]
index => "czh-uat-api-order"
}
}
if [fields][logtype] == "czh-uat-parent-plus"{
elasticsearch {
hosts => ["192.168.102.17:9200","192.168.102.26:9200"]
index => "czh-uat-parent-plus"
}
}
if [fields][logtype] == "czh-uat-user-production"{
elasticsearch {
hosts => ["192.168.102.17:9200","192.168.102.26:9200"]
index => "czh-uat-user-production"
}
}
filebeat+logstash配置的更多相关文章
- 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 ...
- Filebeat与Logstash配置SSL加密通信
为了保证应用日志数据的传输安全,我们可以使用SSL相互身份验证来保护Filebeat和Logstash之间的连接. 这可以确保Filebeat仅将加密数据发送到受信任的Logstash服务器,并确保L ...
- filebeat + logstash 日志采集链路配置
1. 概述 一个完整的采集链路的流程如下: 所以要进行采集链路的部署需要以下几个步聚: nginx的配置 filebeat部署 logstash部署 kafka部署 kudu部署 下面将详细说明各个部 ...
- [2017-07-18]logstash配置示例
提醒 /etc/logstash/conf.d/下虽然可以有多个conf文件,但是Logstash执行时,实际上只有一个pipeline,它会将/etc/logstash/conf.d/下的所有con ...
- filebeat -> logstash -> elasticsearch -> kibana ELK 日志收集搭建
Filebeat 安装参考 http://blog.csdn.net/kk185800961/article/details/54579376 elasticsearch 安装参考http://blo ...
- Nginx filebeat+logstash+Elasticsearch+kibana实现nginx日志图形化展示
filebeat+logstash+Elasticsearch+kibana实现nginx日志图形化展示 by:授客 QQ:1033553122 测试环境 Win7 64 CentOS-7- ...
- Filebeat+Logstash+ElasticSearch+Kibana搭建Apache访问日志解析平台
对于ELK还不太熟悉的同学可以参考我前面的两篇文章ElasticSearch + Logstash + Kibana 搭建笔记.Log stash学习笔记(一),本文搭建了一套专门访问Apache的访 ...
- Filebeat+Logstash+Elasticsearch测试
安装配置好三个软件使之能够正常启动,下面开始测试. 第一步 elasticsearch提供了restful api,这些api会非常便利,为了方便查看,可以使用postman调用接口. 1.查看Ela ...
随机推荐
- C# List集合去重使用lambda表达式
name age sex Lucy 22 woman Lily 23 woman Tom 24 man Lucy 22 woman Lily 23 woman LiLei 25 man List< ...
- 微信小程序支付证书及SSL证书使用
小程序使用微信支付包括:电脑管理控制台导入证书->修改代码为搜索证书->授权IIS使用证书->设置TSL加密级别为1.2 描述: 1.通常调用微信生成订单接口的时候,使用的证书都是直 ...
- OV摄像头图像采集基础知识总结
目前FPGA用于图像采集 传输 处理 显示应用越来越多,主要原因是图像处理领域的火热以及FPGA强大的并行处理能力.本文以OV7725为例,对摄像头使用方面的基础知识做个小的总结,为后续做个铺垫. 下 ...
- jQuery 中的简单动画
制作动画常用方法: show("速度") 显示元素 hide("速度") 隐藏元素 toggle() 切换效果 例如下jQuery代 ...
- Linux Collection:源和更新
PAS 配置sources.list软件源 参考例子(Debian 9,文件/etc/apt/sources.list): deb https://mirrors.ustc.edu.cn/debian ...
- Linux运维高级-核心知识提高
一.Linux之定时任务crond 二.Linux之用户管理 三.Linux之初识磁盘 四.Linux之磁盘管理 五.Linux三剑客-SED 六.Linux三剑客-AWK 七.初识shell编程 八 ...
- 利用XShell上传、下载文件(使用sz与rz命令)
XSHELL工具上传文件到Linux以及下载文件到本地(Windows) Xshell很好用,然后有时候想在windows和linux上传或下载某个文件,其实有个很简单的方法就是rz,sz.首先你 ...
- tomcat目录
1.解决Nginx+Tomcat下客户端https请求跳转成http的问题 2.tomcat配置通过域名直接访问项目首页步骤 3.tomcat配置文件server.xml详解 4.nginx-t/co ...
- Codeforces Round 1153(div. 2)
这场奇差.ABCD四题.179名. 但是E在现场有213个人做出. 描述一下我在35分钟做完D后的心路历程. 首先看到这道E,第一下想到的是把所有的横向和竖向的整列(行)求出相连的个数. 然后想如何能 ...
- django 之 stark组件
----------------------------------------------------------------烦恼没完没了,内心动荡不安,呜呼哀哉. 一.有个特殊的需求,需要用sta ...