Skip to content

Support setting action.auto_create_index=false per request #23685

Closed
@spalger

Description

@spalger

Describe the feature: On index/create or any request that would normally cause non-existing indexes to be created, a parameter would allow disabling automatic index creation for that request. The inverse should not be true (you shouldn't be able to opt-out of the action.auto_create_index config).

Examples:
Standard scenario:

# config/elasticsearch.yml
action.auto_create_index: true
curl -XDELETE 'http://localhost:9200/.kibana'
# <- ok

curl -XPOST 'http://localhost:9200/.kibana/visualization/id?auto_create_index=disable' -d '{}'
# <- fails the same way it would if action.auto_create_index was set to false

Inverse scenario:

# config/elasticsearch.yml
action.auto_create_index: false
curl -XDELETE 'http://localhost:9200/.kibana'
# <- ok

curl -XPOST 'http://localhost:9200/.kibana/visualization/id?auto_create_index=enable' -d '{}'
# <- should also fail, the only valid value for auto_create_index is "disable"

Why: Kibana currently polls elasticsearch every so often to determine if it is in an expected state. In those checks it ensures that the .kibana index exists and creates it if not. This has several issues, one of which is the window of time between when the .kibana index is deleted and the next Kibana health check runs where Kibana's behavior is unpredictable.

We would like to move to a new model for this check:

  • make requests that try to use the .kibana index
  • ensure that requests fail when the index does not exist
  • react to the errors by:
    • creating the .kibana index
    • waiting for it to go yellow
    • trying the original request again

/cc @jbudz @tylersmalley

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions