今天在一個(gè)坑里待了2個(gè)小時(shí)睦刃,明明配置是對的盆耽,但就是沒有起效官卡。
當(dāng)前aaa.log日志為:
2017-02-14 11:52:18.772 [catalina-exec-74] DEBUG aaa - loginRespons:{
"status": "200",
"userId": "Pl016",
"userGroup": "0",
"areaCode": "9999",
"epgIndexType": "",
"epgIndex": "http://ip:58082/epg/api/page/biz_123456.json",
"testEpgIndex":"http://ip:58082/epg/api/page/biz_123456.json",
"epgServer": "http://ip:58082/epg/",
"aaaServer": "http://ip:58082/epg/",
userServer": "http://ip:58082/epg/",
}
日志到Logstash->elasticsearch->kibana中顯示成N個(gè)message,如"status": "200"為一行, "userId": "Pl016"為另外一行部逮。
參考filebeat的官網(wǎng)院促,在filebeat.yml中設(shè)置
filebeat.prospectors:
- input_type: log
document_type: aaa
paths:
- /opt/product/data/logs/epg/aaa*.*
multiline.pattern: '^[0-9]{4}-[0-9]{2}-[0-9]{2}'
multiline.negate: true
multiline.match: after
multiline.timeout: 10s
重啟容器筏养,按道理是可以將非日期開頭的的行 合并到第一行中的。
但是就是不生效常拓。試了很多次渐溶,改配置,依舊沒效果弄抬。
問題就出在:重啟容器茎辐。
我以為docker-compose up -d
可以重啟容器,但是事實(shí)并沒有來著掂恕,
該命令對應(yīng)含義:構(gòu)建拖陆,(重新)創(chuàng)建,啟動(dòng)懊亡,鏈接一個(gè)服務(wù)相關(guān)的容器依啰。
Paste_Image.png
虧呀,浪費(fèi)了大好時(shí)光鸯两。
學(xué)習(xí)要保持一顆嚴(yán)謹(jǐn)?shù)男摹?/p>