本人新手一枚,尝试搭建ELK环境,并取回tomcat日志,然后创建索引后无结果返回,求指教.
[/*]
[*]kibana正常启动
[/*]
[*]kibana中创建名为tomcat-*的索引后查询无数据
[/*]
[/list]
- 创建logstash配置文件,tomcat.conf,内容如下[list][*]input{ file { path => "/var/opt/esl/webservices/esl_webservice_1.log" start_position => "beginning" } } output{ stdout { codec => json } elasticsearch { hosts => "16.187.106.154" index => "tomcat-%{+YYYY.MM.dd}" } }
[/*]
[*]kibana正常启动
[/*]
[*]kibana中创建名为tomcat-*的索引后查询无数据
[/*]
[/list]
7 个回复
stab - freshman
赞同来自:
yunlong_yuan
赞同来自:
*[/url]
然后得到了下面的东西
{"tomcat-2016.04.05":{"aliases":{},"mappings":{"logs":{"properties":{"@timestamp":{"type":"date","format":"strict_date_optional_time||epoch_millis"},"@version":{"type":"string"},"host":{"type":"string"},"message":{"type":"string"},"path":{"type":"string"}}}},"settings":{"index":{"creation_date":"1459882488843","number_of_shards":"5","number_of_replicas":"1","uuid":"T9nzAvwWSHOYmppBcRoMmg","version":{"created":"2020199"}}},"warmers":{}}}
这样是表示没有数据吗?
junjielee - Pythonor in Guangzhou
赞同来自:
或者你可以用 elasticsearch的 rest api查看数据,如果有数据,但是kibana对应日期的没有显示,可能就是配置问题了
yunlong_yuan
赞同来自:
[/*]
[/list]
guoyiqin
赞同来自:
coolloves - search...
赞同来自:
curl localhost:9200/indexname/_search?size=10&from=0&pretty
yunlong_yuan
赞同来自: