错误:index_not_found_exception [英] Error: index_not_found_exception

查看:1820
本文介绍了错误:index_not_found_exception的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用ELK堆栈分析我的日志文件.我上周进行了测试,一切正常.

I use ELK stack to analyze my log file. I have tested last week and everything works well.

今天,我进行了测试,但键入" http://localhost:9200/iot_log/_count时遇到此错误"(iot_log是我的索引模式):

Today, I tested but I get this error when I typed "http://localhost:9200/iot_log/_count" (iot_log is my index pattern):

{错误":{"root_cause":[{类型":"index_not_found_exception",原因":否" 这样的 index," resource.type:" index_or_alias," resource.id:" iot_log," index_uuid:" na ," index:" iot_log}]," type :" index_not_found_exception,"原因:"没有这样的 index," resource.type:" index_or_alias," resource.id:" iot_log," index_uuid:" na ," index:" iot_log},"状态":404}

{"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index","resource.type":"index_or_alias","resource.id":"iot_log","index_uuid":"na","index":"iot_log"}],"type":"index_not_found_exception","reason":"no such index","resource.type":"index_or_alias","resource.id":"iot_log","index_uuid":"na","index":"iot_log"},"status":404}

我确实在论坛上进行了搜索,但没有找到解决方案,我想知道导致此问题的原因是什么,我该如何解决?

I really searched the forums but I have not found a solution, I want to know what is the cause of this problem please and how can I correct it?

推荐答案

确保索引iot_log存在并且

Make sure index iot_log exist and create it if not:

curl -X PUT "localhost:9200/iot_log" -H 'Content-Type: application/json' -d'{ "settings" : { "index" : { } }}'

这篇关于错误:index_not_found_exception的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆