logstashopensearchopensearch-dashboards

Is it possible to create index like myindex:logstash-012 in opensearch dashbaord


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


Solution

  • 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