Commit graph

41 commits

Author SHA1 Message Date
Stef Nestor
c1019d4c5d
(Doc+) Link API doc to parent object - part1 (#111951)
* (Doc+) Link API to parent Doc part1

---------

Co-authored-by: shainaraskas <shaina.raskas@elastic.co>
Co-authored-by: shainaraskas <58563081+shainaraskas@users.noreply.github.com>
2024-08-20 14:58:18 -06:00
Niels Bauman
ba91bfdc94
Lazily create the failure store (#109289)
Rather than initializing the failure store right away when a new
data stream is created, we leave it empty and mark it for lazy
rollover. This results in the failure store only being initialized
(i.e. an index created) when a failure has actually occurred.

The exception to the rule is when a failure occurs while the data
stream is being auto-created. In that case, we do want to initialize
the failure store right away.
2024-06-19 13:18:47 +02:00
Niels Bauman
920290a37b
Extract DataStreamIndices from DataStream class (#107562)
We were seeing more and more common fields between "regular" backing indices and failure store indices (i.e. `indices`, `rolloverOnWrite`, `autoShardingEvent`). To avoid having to duplicate these fields (and possibly any future fields), we extract a class that contains these fields.
2024-05-14 11:14:13 +02:00
Mary Gouseti
046cdeae23
Introduce lazy rollover for mapping updates in data streams (#103309)
In this PR we implement the idea to introduce a flag, that a data stream needs to be rolloved over before the next document is indexed.
2024-01-08 15:07:16 +02:00
James Baiera
6fa7f60073
Add ability to create a data stream failure store (#99134)
Adds the ability to configure a data stream to create a new kind of backing index called a failure store which will eventually be used to store error information when ingest pipelines fail to ingest a document or when a document fails to be parsed correctly by the configured mapping on the data stream.
2023-11-15 15:32:51 -05:00
Andrei Dan
f202ad02fe
GET _data_stream displays both ILM and DSL information (#99947)
This add support to the `GET _data_stream` API for displaying the value
of the `index.lifecycle.prefer_ilm` setting both at the backing index
level and at the top level (top level meaning, similarly to the existing
`ilm_policy` field, the value in the index template that's backing the
data stream), an `ilm_policy` field for each backing index displaying
the actual ILM policy configured for the index itself, a `managed_by`
field for each backing index indicating who manages this index (the
possible values are: `Index Lifecycle Management`, `Data stream
lifecycle`, and `Unmanaged`).

This also adds a top level field to indicate which system would manage
the next generation index for this data stream based on the current
configuration. This field is called `next_generation_managed_by` and the
same values as the indices level `managed_by` field has are available.

An example output for a data stream that has 2 backing indices managed
by ILM and the write index by DSL:

```
{
	"data_streams": [{
		"name": "datastream-psnyudmbitp",
		"timestamp_field": {
			"name": "@timestamp"
		},
		"indices": [{
			"index_name": ".ds-datastream-psnyudmbitp-2023.09.27-000001",
			"index_uuid": "kyw0WEXvS8-ahchYS10NRQ",
                        "prefer_ilm": true,
			"ilm_policy": "policy-uVBEI",
			"managed_by": "Index Lifecycle Management"
		}, {
			"index_name": ".ds-datastream-psnyudmbitp-2023.09.27-000002",
			"index_uuid": "pDLdc4DERwO54GRzDr4krw",
			"prefer_ilm": true,
			"ilm_policy": "policy-uVBEI",
			"managed_by": "Index Lifecycle Management"
		}, {
			"index_name": ".ds-datastream-psnyudmbitp-2023.09.27-000003",
			"index_uuid": "gYZirLKcS3mlc1c3oHRpYw",
			"prefer_ilm": false,
			"ilm_policy": "policy-uVBEI",
                        "managed_by": "Data stream lifecycle"
		}],
		"generation": 3,
		"status": "YELLOW",
		"template": "indextemplate-obcvkbjqand",
		"lifecycle": {
			"enabled": true,
			"data_retention": "90d"
		},
		"ilm_policy": "policy-uVBEI",
                "next_generation_managed_by": "Data stream lifecycle",
		"prefer_ilm": false,
		"hidden": false,
		"system": false,
		"allow_custom_routing": false,
		"replicated": false
	}]
}
```
2023-09-28 13:48:17 -04:00
Mary Gouseti
e71ea6e6d7
Add data stream lifecycle by default (#97823)
In this PR we enable all new data streams to be managed by the data
stream lifecycle by default. This is implemented by adding an empty
`lifecycle: {}` upon new data stream creation. 

Opting out is represented by a the `enabled` flag:

```
{
  "lifecycle": {
    "enabled": false
  }
}
```

This change has the following implications on when is an index managed
and by which feature:

| Parent data stream lifecycle| ILM| `prefer_ilm`|Managed by|
|----------------------------|----|----------------|-| | default | yes|
true| ILM| | default | yes| false| data stream lifecycle| |default |
no|true/false|data stream lifecycle| |opt-out or
missing|yes|true/false|ILM| |opt-out or missing|no|true/false|unmanaged|

Data streams that have been created before the data stream lifecycle is
enabled will not have the default lifecycle.

Next steps: - We need to document this when the feature will be GA
(https://github.com/elastic/elasticsearch/issues/97973).
2023-08-11 06:28:37 -04:00
Mary Gouseti
09d396a91f
Change test tear down to only remove resources created by the test (#98060) 2023-07-31 17:23:37 +03:00
Abdon Pijpelink
ccc2d94baf
[DOCS] Explain how to change aliases in data streams documentation (#94110) 2023-03-21 15:34:00 +01:00
James Rodewig
6c8f0b170b
[DOCS] Fix ordered list formatting in data stream docs (#81667) 2021-12-13 12:53:48 -05:00
Martijn van Groningen
e20fe6d639
Add replicated field to get data stream api response. (#80988)
Internally we already kept track of whether a data stream is replicated by CCR.
It is part of the `DataStream` class. This just adds it to the xcontent serialization
of the get data stream api response class.

Relates to elastic/kibana#118899
2021-11-30 09:30:05 +01:00
James Rodewig
58abbe941f
[DOCS] Fix cluster update settings refs (#79580)
The API is named 'cluster update settings,' not 'update cluster settings.'
2021-10-20 13:16:35 -04:00
Nikola Grcevski
055c770083
Deprecation of transient cluster settings (#78794)
This PR changes uses of transient cluster settings to
persistent cluster settings. 

The PR also deprecates the transient settings usage.

Relates to #49540
2021-10-15 13:00:52 -04:00
xiaoping
7e08c6b98a
Data stream support read and write with custom routing and partition size (#74394) 2021-10-11 07:14:15 -05:00
James Rodewig
0c205b0d68
[DOCS] Document how to switch ILM policies (#73967)
To switch an index's lifecycle policy, you must first remove the existing
policy. Otherwise, phase execution for the index may silently fail.

Closes #70151
2021-06-28 10:32:01 -04:00
James Rodewig
5729bb8d49
[DOCS] Update alias references (#73427)
Updates several `index aliases` references to `aliases`.
2021-05-27 16:00:57 -04:00
Jay Modi
a7dbb31765
Add Fleet action results system data stream (#71667)
This commit adds support for system data streams and also the first use
of a system data stream with the fleet action results data stream. A
system data stream is one that is used to store system data that users
should not interact with directly. Elasticsearch will manage these data
streams. REST API access is available for external system data streams
so that other stack components can store system data within a system
data stream. System data streams will not use the system index read and
write threadpools.
2021-04-20 13:33:12 -06:00
James Rodewig
f41320616c
[DOCS] Refactor data stream setup tutorial (#71074) 2021-03-31 17:28:55 -04:00
James Rodewig
5c75d004fa
[DOCS] Replace put with create or update in API names (#70330)
Co-authored-by: debadair <debadair@elastic.co>
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2021-03-15 14:49:44 -04:00
Joe Gallo
f93242a5f9
Switch built-in policies to max_primary_shard_size (#69995) 2021-03-04 17:00:45 -05:00
James Rodewig
14ea0072e9
[DOCS] Update priority recommendation for index templates (#69006) 2021-02-16 10:53:28 -05:00
James Rodewig
86814df052
[DOCS] Clean up index template xrefs (#67264) 2021-01-11 12:38:09 -05:00
Dan Hermann
83a5256dc2
Include date in data stream backing index names (#65205) 2020-12-14 16:46:54 -06:00
Przemko Robakowski
0e81fc641a
Hidden data streams (#63987)
* Hidden data streams

* whitespace reverted

* stricter ds name

* Revert "stricter ds name"

This reverts commit 100dba5f3c.

* String.format removed

* fix test

* fix GetDataStream action

* fix test

* fix test

* rest test

* rest test

* spotless

* tests

* Delete a.json

* added expand_wildcards for GetDataStream and DeleteDataStream

* unused imports

* add hidden setting to data stream template

* fix expand_wildcards

* spotless

* fix compilation

* unused import

* yaml test

* fix test

* fix cleanup

* review

* compilation fix

* fix javadoc

* fix javadoc
2020-10-30 11:41:58 +01:00
James Rodewig
ea3107827f
[DOCS] Tighten data streams copy (#64085) 2020-10-24 14:24:01 -04:00
James Rodewig
cd6304ae6b
[DOCS] Add admon for built-in index templates (#61063)
Adds an important admonition for the built-in `metrics-*-*` and `logs-*-*` index
templates.

Updates several put index template snippets to include a priority.
2020-08-17 11:37:08 -04:00
James Rodewig
ff14fb9b6f
[DOCS] Change wildcard to index pattern in DS docs (#61058) 2020-08-12 14:55:56 -04:00
James Rodewig
ebfeb471cd
[DOCS] Update example data stream names (#60783)
Uses `my-data-stream` in place of `logs` for data stream examples.
This provides a more intuitive experience for users that copy/paste
their own values into snippets.
2020-08-06 08:37:44 -04:00
James Rodewig
4a45c2dafb
[DOCS] Fix data stream docs (#59818) 2020-07-21 15:42:06 -04:00
James Rodewig
d27c286e9b
[DOCS] Add write_index_only param to ds mapping tutorials (#59618) 2020-07-15 12:20:57 -04:00
James Rodewig
0f145ace6f
[DOCS] Simplify index template snippets for data streams (#59533)
Removes the `@timestamp` field mapping from several data stream index
template snippets.

With #59317, the `@timestamp` field defaults to a `date` field data type
for data streams.
2020-07-14 12:08:54 -04:00
Andrei Dan
5609353c5d
Default to @timestamp in composable template datastream definition (#59317)
This makes the data_stream timestamp field specification optional when
defining a composable template.
When there isn't one specified it will default to `@timestamp`.
2020-07-14 11:45:48 +01:00
James Rodewig
b174655457
[DOCS] Add x-pack tag to data stream docs (#59241) 2020-07-09 08:45:13 -04:00
James Rodewig
7bd93de06f
[DOCS] Update get data stream API response (#59197) (#59230)
Updates docs and snippets for changes made to the get data stream API with
PR #59128.
2020-07-08 11:02:30 -04:00
James Rodewig
678f9e3413
Revert "[DOCS] Update get data stream API response (#59197)" (#59227)
This reverts commit db3852898f.
2020-07-08 09:39:16 -04:00
James Rodewig
db3852898f
[DOCS] Update get data stream API response (#59197)
Updates docs and snippets for changes made to the get data stream API with
PR #59128.
2020-07-08 08:40:49 -04:00
James Rodewig
2be9db01c8
[DOCS] Replace datatype with data type (#58972) 2020-07-07 13:52:10 -04:00
James Rodewig
89cdbbeb7d
[DOCS] Update data stream mapping and setting docs (#58874) 2020-07-06 08:36:29 -04:00
James Rodewig
9f86ce6c0e
[DOCS] Remove composable index template refs (#58567)
Replaces `composable index template` and `composable template` with
`index template` throughout data stream-related docs.

`Composable index template` is only used to contrast with legacy index
templates.
2020-06-26 11:12:36 -04:00
James Rodewig
e33a0dfe77
[DOCS] Note that DS timestamp field mapping changes require reindex (#58444)
With #58096, data streams now track the timestamp field mapping outside
of the template associated with the stream. This means you can no longer
update the timestamp field mapping using template changes.

This updates the associated data stream docs.
2020-06-24 17:00:09 -04:00
James Rodewig
0fc2bd8e62
[DOCS] Add 'Change DS mappings and settings' tutorial (#58148)
Adds a tutorial for updating the mappings and
index settings of a data stream's backing indices.
2020-06-16 16:04:38 -04:00