启动
nohup ./bin/logstash -f ./pipelines/log_collect.conf 1>nohup.loog 2>nohup.log &3.3、部署客户端filebeat日志格式如下
gtms-switch-center 2022-04-19 17:28:14.616 [http-nio-8080-exec-989] INFO c.p.switchcenter.web.controller.SwitchController1、linux系统
tar -xvf filebeat.tar.gzcd filebeat/
vi filebeat.ymlfilebeat.prospectors: - input_type: log paths: - /bankapp/switch/gtms-switch-center/com.pactera.jep.log.biz*.log multiline: pattern: '^gtms-switch-center' negate: true match: after max_lines: 200 timeout: 20s fields: env: "prd001" appid: "switch" appname: "switch" hostip: "192.168.10.15" reload.enabled: true reload.period: 2Sfields_under_root: trueoutput.logstash: hosts: ["192.168.10.11:10515" ] enabled: true
nohup ./filebeat -e -c filebeat.yml -d "publish" 1>/dev/null 2>&1 &2、windows系统
- windows安装直接解压即可,解压如下
文章插图
- 编写配置文件filebeat.yml
filebeat.prospectors: - input_type: log encoding: gbk paths: - C:/bankapp/switch/gtms-switch-center/com.pactera.jep.log.biz*.log multiline: pattern: '^gtms-switch-center' negate: true match: after max_lines: 200 timeout: 20s fields: env: "prd001" appid: "switch" appname: "switch" hostip: "192.168.10.16" reload.enabled: true reload.period: 2S fields_under_root: trueoutput.logstash: hosts: ["192.168.10.11:10515" ] enabled: true
- 编写后台启动脚本startFilebeat.vbs
set ws=WScript.CreateObject("WScript.Shell")ws.Run "filebeat.exe -e -c filebeat.yml",0
- 启动,双击脚本startFilebeat.vbs
文章插图
3.4、grafana查看日志用grafana查看日志,可以根据自己的删选条件(关键字、时间等)选择查询响应的日志信息,具体如图
文章插图
文章插图
经验总结扩展阅读
-
-
-
-
-
-
-
-
-
爱慕|女人看你顺眼,不是说喜欢你,而是开始出现这些迹象
-
-
-
作者无笔 一个男人的懊悔:娶大龄剩女半年,才知哥们的话不是空穴来风
-
-
-
发型以家人之名演员染发,唐灿变成熟女人,看到月亮:乖乖女黑化了!
-
-
-
-
-