启动
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查看日志,可以根据自己的删选条件(关键字、时间等)选择查询响应的日志信息,具体如图

文章插图

文章插图
经验总结扩展阅读
-
-
温州|行拘+退学处理!温州高校深夜通报两起男生骚扰女性事件处理进展
-
2023年1月9日安装门户好吗 2023年1月9日是安装门户的黄道吉日吗
-
许三观卖血记|活着是生命的力量,活得好是人生的态度
-
-
moss时尚圈过年了!来“蹦迪”的明星们用了什么?
-
-
-
-
-
-
-
-
抑郁症患者 抑郁症:若想走向康复与强大,你必须学会与自己的灵魂对话
-
-
vivoT1和荣耀50哪个好_vivoT1和荣耀50参数对比
-
-
-
2022年农历腊月初七开学典礼吉日 2022年12月29日适合开学典礼吗
-