[root@dr-mysql01 frontend]# cat logstash_frontend.conf
input {
file {
type => "zj_frontend_access"
path => ["/data01/applog_backup/zjzc_log/zj-frontend0*access*"]
} file {
type => "wj_frontend_access"
path => ["/data01/applog_backup/winfae_log/wj-frontend0*access*"]
} }
filter {
grok {
match => {
"message" => "%{IPORHOST:clientip} \[%{HTTPDATE:time}\] \"%{WORD:verb} %{URIPATHPARAM:request} HTTP/%{NUMBER:httpversion}\" %{NUMBER:http_status_code} %{NUMBER:bytes} \"(?<http_referer>\S+)\" \"(?<http_user_agent>\S+)\" \"(?<http_x_forwarded_for>\S+)\""
}
}
} output {
if [type] == "zj_frontend_access" {
redis {
host => "192.168.32.67"
data_type => "list"
key => "zj_frontend_access:redis"
port=>"6379"
password => "1234567"
}
}
else if [type] == "wj_frontend_access"{
redis {
host => "192.168.32.67"
data_type => "list"
key => "wj_frontend_access:redis"
port=>"6379"
password => "1234567"
}
}
} [root@dr-mysql01 frontend]# cat logstash_indexer.conf
input { redis {
host => "192.168.32.67"
data_type => "list"
key => "zj_frontend_access:redis"
password => "1234567"
port =>"6379"
} redis {
host => "192.168.32.67"
data_type => "list"
key => "wj_frontend_access:redis"
password => "1234567"
port =>"6379"
} }
output {
if [type] == "zj_frontend_access"{
elasticsearch {
hosts => "192.168.32.80:9200"
index => "logstash-zjzc-frontend-%{+YYYY.MM.dd}"
}
stdout {
codec => rubydebug
}
}
else if [type] == "wj_frontend_access"{
elasticsearch {
hosts => "192.168.32.81:9200"
index => "logstash-wj-frontend-%{+YYYY.MM.dd}"
}
stdout {
codec => rubydebug
} } }

最新文章

  1. CSS media queries
  2. Windows 7 与 Vmware Ubuntu 15.10_64 共享文件夹
  3. Syntax highlighter for CKEditor
  4. 关于部分应用无法向POJ提交代码的解决方案
  5. kubernetes多节点部署的决心
  6. AtomicInteger的用法
  7. DotNetCore跨平台~Json动态序列化属性
  8. 强力推荐各位攻城狮查看,收藏IT职业技能图谱(全套13张)
  9. 第二章 Linux目录学习
  10. 《Linux就该这么学》第十七天课程
  11. ionic3 git 提交报错
  12. 【javascript】js 获取 url 后的参数值
  13. jackson 转换 enum 类型
  14. Xpath同时选取不同属性的元素
  15. Shell 学习笔记之函数
  16. (LeetCode 203)Remove Linked List Elements
  17. POJ 3006 Dirichlet&#39;s Theorem on Arithmetic Progressions (素数)
  18. 如何升级到python3版本并且安装pip3
  19. css选择器星号(*)
  20. corethink功能模块探索开发(六)让这个模块在前台显示

热门文章

  1. 大端模式&amp;小端模式、主机序&amp;网络序、入栈地址高低问题
  2. 使用Calendar增加日期
  3. NOI十连测 第六测 T3
  4. POJ 1094 Sorting It All Out (拓扑排序) - from lanshui_Yang
  5. devStack
  6. zedboard--Opencv的移植(十)
  7. JsonKit 解析
  8. 棋盘覆盖(大数阶乘,大数相除 + java)
  9. RMAN数据库恢复之恢复表空间和数据文件
  10. html5的改变