我使用帶有ES的filebeat作爲輸出。我指定了: input_type:log document_type:apache 路徑: -/var/log/httpd/* _ log 位於/etc/filebeat/filebeat.yml中,我能夠在Kibana中成功查看結果。 然而,我正在玩「Watcher」,並試圖創建一個基於HTTP返回代碼404的手錶,我看到沒有字段在我的Kibana filebeat結果中對應於並且僅對應於「404」,例如「響應」,恐怕我錯過了一些東西,因爲filebeat和ELK都是BIG產品,希望能有幫助。filebeat中的Apache響應字段名稱
0
A
回答
0
Filebeat會在每個事件的message
字段中「按原樣」轉發日誌行。爲了進一步處理消息以將響應代碼等細節提取到它們自己的字段中,可以使用Logstash。
在Logstash中,您將使用beats input從Filebeat接收數據,然後應用grok filter解析消息中的數據,最後使用elasticsearch輸出將數據寫入Elasticsearch。
0
使用Logstash的另一種方法是使用「Ingest Node」,並在Elasticsearch中使用合適的管道。
https://www.elastic.co/guide/en/beats/filebeat/5.0/configuring-ingest-node.html
您可以建立一個管道包括神交處理器:
https://www.elastic.co/guide/en/elasticsearch/reference/5.0/grok-processor.html
我這樣做是與此pipeline.json
文件:
{
"description": "Combined Apache Log Pipeline",
"processors": [
{
"grok": {
"field": "message",
"patterns": [ "%{COMBINEDAPACHELOG}" ]
}
}
]
}
然後我跑這個命令將流水線部署到羣集:
curl -XPUT 'http://node-01.example.com:9200/_ingest/pipeline/combined-apache-log' [email protected]
最後,我更新filebeat.yml告訴Elasticsearch輸出處理與管道事件:
#================================ Outputs =====================================
#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
# Array of hosts to connect to.
hosts:
- "192.168.0.1:9200"
- "192.168.0.2:9200"
- "192.168.0.3:9200"
loadbalance: true
pipeline: combined-apache-log
這似乎是工作,而無需Logstash。
我絕對看到領域的迴應,引薦,響應等
相關問題
- 1. 如何在CURL響應中獲取字段名稱的值
- 2. 在彈性搜索響應中更改字段名稱
- 3. 在Rails響應中更改JSON字段名稱
- 4. db中字段的名稱
- 5. axios響應中的字段
- 6. kibana中的字段名稱的別名
- 7. 具有字段名稱和值的XML響應映射java對象的字段名稱和值無法從字段中取回
- 8. PostgresSQL字段名稱
- 9. 字段名稱表
- 10. GWT類字段的名稱字段
- 11. HTTP請求+響應名稱
- 12. 404錯誤與名稱=「名稱」字段
- 13. 無效的字段名稱
- 14. Filebeat重構節拍元數據字段
- 15. Filebeat - 從消息行解析字段
- 16. 在geokettle中重命名字段名稱
- 17. 段中的應用程序包名稱
- 18. 數據庫字段名稱長度對性能的影響?
- 19. ValueError:字典包含不在字段名稱中的字段:'1'
- 20. 解析SQL中的名稱字段
- 21. SSRS中的動態字段名稱
- 22. Django Mixin中的動態字段名稱
- 23. ECharts中的自定義字段名稱
- 24. 更改R中字段的名稱
- 25. delphixe4中的FastReport4字段名稱
- 26. 獲取VBA中的字段名稱
- 27. Google-Bigquery:JOIN中衝突的字段名稱?
- 28. 字段中的兩個名稱
- 29. joi驗證中的動態密鑰名稱(字段名稱)
- 30. 數據庫中的字段名稱跨度類名稱