Skip to content

System Indices #50251

Closed
Closed
@jaymode

Description

@jaymode

This issue serves as an overarching issue for what we call System Indices and
details our plan to implement this feature.

As Elasticsearch and the rest of the stack has evolved, there is an increasing
reliance on indices as an implementation detail of features. Certain features
are critical, like Security, and this implementation detail should not be
necessary for a user to know or think about. Unfortunately, this implementation
detail has been exposed to users in various ways.

In general, most of the indices that would be considered system indices have
names that start with a . and are referred to as dot indices. This is modeled
after dot files to suggest that the index is an implementation detail that
should not be interacted with. Searches over all indices, such as those done by
Kibana by default, include dot indices, while to a user all indices means all
indices they created. Snapshots include dot indices by default, but restoring
dot indices does not work since the intended index already exists and
should be wholly replaced. And upgrades of dot indices are managed with
complicated aliases and versioned names, where each dot index has its own
versioning and upgrade logic that must be run externally.

Dot indices will be superseded by system indices that are registered through
a module or plugin. A special plugin type will be added that defines the system
indices that the plugin provides along with the mappings and APIs necessary to
access these indices. The existing search API (and other data APIs) will not be
able to search a system index. APIs used for monitoring and troubleshooting will
continue to operate as they do today and include system indices in their output.

There are some dot indices that do not necessarily fit the mold of a normal
system index; instead they store data that the system produces with the intent
that users can also query against this data. For these indices we will move to
adding a hidden index that will not be resolved by default for wildcards.
These indices can be specifically requested or an IndicesOption can be specified
so that these indices are not ignored during wildcard resolution. An index may
only be marked as hidden at creation time and will be done so through the use
of an index setting.

Hidden indices will not may have names that are prefixed by a dot. Hidden indices will not
inherit from a global index template.

In order to facilitate the migration from accessing dot indices directly the following
phased approach will be taken.

The initial work is the introduction of the infrastructure to define hidden indices and
system index plugins with dedicated APIs.

Tasks

The above steps will get us to a point where other teams can begin migrating from direct access to their system index and make use of the new APIs. The majority of the internal (to Elasticsearch) work will still need to be implemented.

System Index Patterns

IngestGeoIpPlugin

  • .geoip_databases

KibanaPlugin

  • .kibana_* (alias: .kibana)
  • .reporting-*
  • .apm-agent-configuration
  • .apm-custom-link

AsyncResultsIndexPlugin

  • .async-search

EnrichPlugin

  • .enrich-*

Fleet

  • .fleet-actions~(-results*) (alias: .fleet-actions)
  • .fleet-agents* (alias: .fleet-agents)
  • .fleet-enrollment-api-keys* (alias: .fleet-enrollment-api-keys)
  • .fleet-policies-[0-9]+* (alias: .fleet-policies)
  • .fleet-policies-leader* (alias: .fleet-policies-leader)
  • .fleet-servers* (alias: .fleet-servers)
  • .fleet-artifacts* (alias: .fleet-artifacts)
  • .fleet-actions-results

Logstash

  • .logstash

MachineLearning

  • .ml-meta*
  • .ml-config*
  • .ml-inference-*
    [associated indices]
  • .ml-anomalies-*
  • .ml-state*
  • .ml-stats-*
  • .ml-notifications*
  • .ml-annotations*

SearchableSnapshots

  • .snapshot-blob-cache

Security

  • .security-[0-9]+ (alias: .security)
  • .security-tokens-[0-9]+ (alias: .security-tokens)

Transforms

  • .transform-internal-*
    [associated indices]
  • .transform-notifications-*

Watcher

  • .watches*
  • .triggered_watches*

APIs allowed to access system indices

The APIs that we currently plan to allow system index access for are:

  • GET _cluster/health
  • GET {index}/_recovery
  • GET _cluster/allocation/explain
  • GET _cluster/state
  • POST _cluster/reroute
  • GET {index}/_stats
  • GET {index}/_segments
  • GET {index}/_shard_stores
  • GET _cat/[aliases,indices,health,recovery,shards,segments]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions