Why default index is .kibana_1 in Kibana v6.5.0?

Kibana from the git repo https://github.com/elastic/kibana.git

Today I pulled the latest Kibana v6.5.0 from the tag

$ cd kibana
$ git checkout v6.5.0
$ git checkout -b branch-6.5.0
$ yarn kbn bootstrap
$ yarn start --oss

Run it and discovered that the default index is .kibana_1 now

$ curl -XGET localhost:9200/_cat/indices
green  open .kibana_1                    K6ocAyklQkuCRTH5950ivQ 1 0   15 0 37.5kb 37.5kb

Despite the fact that in the configuration it is still .kibana

$ grep -rn "kibana.index" kibana/\config/kibana.yml 
37:#kibana.index: ".kibana"

Why?
I have a Kibana app which stores some docs in .kibana. And now it doesn't work because of this.

Update 1

I uncommented kibana.index: ".kibana" option in kibana.yml. Restarted and saw the alias

$ curl -XGET localhost:9200/_cat/aliases
.kibana .kibana_1 - - -

Then I commented the option, restarted and now I have the alias name conflict.

server   error  [17:35:34.529] [fatal][root] [invalid_alias_name_exception] Invalid alias name [.kibana], an index exists with the same name as the alias, with { index_uuid="cvaJfJ4oQtenKyT5CItDAQ" & index=".kibana" } :: {"path":"/_aliases","query":{},"body":"{\"actions\":[{\"add\":{\"index\":\".kibana_1\",\"alias\":\".kibana\"}}]}","statusCode":400,"response":"{\"error\":{\"root_cause\":[{\"type\":\"invalid_alias_name_exception\",\"reason\":\"Invalid alias name [.kibana], an index exists with the same name as the alias\",\"index_uuid\":\"cvaJfJ4oQtenKyT5CItDAQ\",\"index\":\".kibana\"}],\"type\":\"invalid_alias_name_exception\",\"reason\":\"Invalid alias name [.kibana], an index exists with the same name as the alias\",\"index_uuid\":\"cvaJfJ4oQtenKyT5CItDAQ\",\"index\":\".kibana\"},\"status\":400}"}
    at respond (/media/trex/safe1/Development/siren/kibana/node_modules/elasticsearch/src/lib/transport.js:308:15)
    at checkRespForFailure (/media/trex/safe1/Development/siren/kibana/node_modules/elasticsearch/src/lib/transport.js:267:7)
    at HttpConnector.<anonymous> (/media/trex/safe1/Development/siren/kibana/node_modules/elasticsearch/src/lib/connectors/http.js:165:7)
    at IncomingMessage.wrapper (/media/trex/safe1/Development/siren/kibana/node_modules/elasticsearch/node_modules/lodash/lodash.js:4949:19)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1064:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)

 FATAL  [invalid_alias_name_exception] Invalid alias name [.kibana], an index exists with the same name as the alias, with { index_uuid="cvaJfJ4oQtenKyT5CItDAQ" & index=".kibana" } :: {"path":"/_aliases","query":{},"body":"{\"actions\":[{\"add\":{\"index\":\".kibana_1\",\"alias\":\".kibana\"}}]}","statusCode":400,"response":"{\"error\":{\"root_cause\":[{\"type\":\"invalid_alias_name_exception\",\"reason\":\"Invalid alias name [.kibana], an index exists with the same name as the alias\",\"index_uuid\":\"cvaJfJ4oQtenKyT5CItDAQ\",\"index\":\".kibana\"}],\"type\":\"invalid_alias_name_exception\",\"reason\":\"Invalid alias name [.kibana], an index exists with the same name as the alias\",\"index_uuid\":\"cvaJfJ4oQtenKyT5CItDAQ\",\"index\":\".kibana\"},\"status\":400}"}

And there are 2 indices

$ curl -XGET localhost:9200/_cat/indices
yellow open .kibana                   L1EtfI9jTfeKfYS1AnYqIw 5 1 0 0 1.1kb 1.1kb
green  open .kibana_1                 prPxlavWS12Fq8ZbCMiejQ 1 0 0 0  230b  230b

Update 2

I deleted .kibana_1, restarted and now my app works.
There are 2 .kibana_n indices

$ curl -XGET localhost:9200/_cat/indices
green  open .kibana_2                 gxGBeCbDRK2MieEKnWe8ew 1 0  2 0  9.4kb  9.4kb
green  open .kibana_1                 J-R87442QY2tzIz2kcgaog 1 0  0 0   230b   230b

And 1 alias

trex@cave:~/Development/siren/kibana$ curl -XGET localhost:9200/_cat/aliases
.kibana .kibana_2 - - -

Ok, the problem is that my plugin is trying to create .kibana but there is an alias with this name already.

I don't know the full details, but we have done this to allow us to use automatic reindex jobs to upgrade dashboards etc in the index for newer versions. So the .kibana alias will always point to the newest kibana index.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.