英文:
Is it possible to create index like myindex:logstash-012 in opensearch dashbaord
问题
我想要创建类似myindex:logstash-012
的索引,这样我就可以在opensearch仪表板中创建索引模式myindex:logs*
。
每次我都遇到以下错误
{
"error": {
"root_cause": [
{
"type": "invalid_index_name_exception",
"reason": "Invalid index name [my-test:test], must not contain ':'",
"index": "my-test:test",
"index_uuid": "_na_"
}
],
"type": "invalid_index_name_exception",
"reason": "Invalid index name [my-test:test], must not contain ':'",
"index": "my-test:test",
"index_uuid": "_na_"
},
"status": 400
}
是否有实现这种索引模式的方法?我尝试了别名和索引模板,但都没有奏效。
谢谢
英文:
I wanted to create index like myindex:logstash-012
so I can create index pattern myindex:logs*
in opensearch dashbaord.
Every time I`m getting is following error
{
"error": {
"root_cause": [
{
"type": "invalid_index_name_exception",
"reason": "Invalid index name [my-test:test], must not contain ':'",
"index": "my-test:test",
"index_uuid": "_na_"
}
],
"type": "invalid_index_name_exception",
"reason": "Invalid index name [my-test:test], must not contain ':'",
"index": "my-test:test",
"index_uuid": "_na_"
},
"status": 400
}
Is there any way to achieve this index pattern. I tried with alias ans index templates but nothing worked.
thanks
答案1
得分: 0
不可以在索引名称中使用列名(自 Elasticsearch 版本 7 起不再支持,而 OpenSearch 是基于 v7.10.x 的分支)。这是索引名称中禁止使用的字符的完整列表:https://opensearch.org/docs/2.5/api-reference/index-apis/create-index/#index-naming-restrictions
但是,您可以使用下划线或句点来达到相同的效果。
英文:
no, you cannot use columns in your index name (that's not possible since elasticsearch v7, and opensearch is a fork of v7.10.x). Here is the full list of forbidden chars in the index name: https://opensearch.org/docs/2.5/api-reference/index-apis/create-index/#index-naming-restrictions
but, I mean, you could achieve the same with an underscore or a dot
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论