- 我試圖把我的日誌,通過對logstash elasticsearch。
我
logstash.conf
有2個日誌文件作爲輸入;彈性搜索作爲輸出;和grok作爲過濾器。這裏是我的神交比賽:任何人都可以提供一個REST API列表來查詢elasticsearch嗎?grok { match => [ "message", "(?<timestamp>[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2},[0-9]{3}) (?:\[%{GREEDYDATA:caller_thread}\]) (?:%{LOGLEVEL:level}) (?:%{DATA:caller_class})(?:\-%{GREEDYDATA:message})" ] }
當elasticsearch開始時,我的所有日志添加爲
logstash.conf
提到elasticsearch服務器配有獨立的索引名。- 我的疑問是,我的日誌是如何存儲在elasticsearch中的?我只知道它與logstash中提到的索引名稱一起存儲。
'http://164.99.178.18:9200/_cat/indices?v' API給我以下:
健康狀況指標PRI代表docs.count docs.deleted store.size pri.store.size
yellow open tomcat-log 5 1 6478 0 1.9mb 1.9mb
yellow open apache-log 5 1 212 0 137kb
137kb
- 但是,在我的日誌的elasticsearch中如何創建」文檔「,」字段「。
,我讀了elasticsearch是基於REST的搜索引擎。因此,如果有任何REST API可用於在elasticsearch中分析我的數據。
參考http://stackoverflow.com/questions/1323449/tool-to-measure-render-time – BlackPOP