Commit graph

9877 commits

Author SHA1 Message Date
Christos Soulios
b81f4187ab
[TSDB] Metric fields in the field caps API (#88695)
To assist the user in configuring the visualizations correctly while leveraging TSDB
functionality, information about TSDB configuration should be exposed via the field 
caps API per field.

Especially for metrics fields, it must be clear which fields are metrics and if they belong 
to only time-series indexes or mixed time-series and non-time-series indexes.

To further distinguish metric fields when they belong to any of the following indices:

  -  Standard (non-time-series) indexes
  -  Time series indexes
  -  Downsampled time series indexes

This PR modifies the field caps API so that the mapping parameters time_series_dimension 
and time_series_dimension are presented only when they are set on fields of time-series indexes.
Those parameters are completely ignored when they are set on standard (non-time-series) indexes.

This PR revisits some of the conventions adopted by #78790
2022-08-04 20:42:34 +03:00
Ed Savage
188f8872c6
[ML] ECS Grok patterns in the _text_structure/find_structure endpoint (#88982)
Also add support for new CATALINA/TOMCAT timestamp formats used by ECS Grok patterns

Relates #77065

Co-authored-by: David Roberts <dave.roberts@elastic.co>
2022-08-04 18:39:04 +01:00
Adam Locke
7b8c056494
[DOCS] Replace ES_JAVA_OPTS with CLI_JAVA_OPTS (#89121) 2022-08-04 09:27:40 -04:00
Abdon Pijpelink
b96c39e7ad
[DOCS] Move completion type asciidoc (#89086)
* [DOCS] Move completion type asciidoc

* Fix failing code snippet test
2022-08-04 10:02:28 +02:00
Stef Nestor
5da482b9de
ILM Frozen allows Unfollow Action (#88973)
Updates [Phase Action](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-index-lifecycle.html#ilm-phase-actions) list to agree with [Unfollow](https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-unfollow.html) page that Frozen tier accepts Unfollow action.

Confirmed v8.3
```diff
PUT _ilm/policy/my_policy
{"policy": {"phases": { "frozen": { "actions": {
+  "unfollow" : {},
  "searchable_snapshot": {
    "snapshot_repository" : "found-snapshots"} } } } } }

{"acknowledged": true }
```
2022-08-03 14:32:15 -06:00
Stef Nestor
4af7069958
Update ES.ILM.Action.ReadOnly (#89054)
Related to [Discuss#311070](https://discuss.elastic.co/t/action-readonly-appears-to-set-index-blocks-write-not-index-blocks-read-only/311070), @joegallo explains

> The [ReadOnlyAction](https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/ReadOnlyAction.java#L58-L65) is composed of a series of steps, the most important to this conversation being the [ReadOnlyStep](https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/ReadOnlyStep.java#L42). That step does indeed add a write block (as opposed to a ‘read_only’) block, almost certainly the reasoning is that a ‘read_only’ block makes the index metadata read only, also, and we can’t have that — it would prevent the index from moving through the rest of the ILM process.  E.g. can’t reassign tiers, can’t change replicas, can’t even change the currently assigned ilm phase/action/step, etc, if you can’t change the index’s metadata.

So, the intention of ILM Action "Read Only" is to make an index's data read only and not also the index's metadata. This also decouples "read only" from understanding overlapping to `index.blocks.read_only` which appears to be an accidental thought overlap.
2022-08-03 14:31:20 -06:00
Julie Tibshirani
21eb984e64
Deprecate the _knn_search endpoint (#88828)
This change deprecates the kNN search API in favor of the new 'knn' option
inside the search API. The 'knn' option is now the preferred way of performing
kNN search.

Relates to #87625
2022-08-03 15:19:01 -04:00
Leaf-Lin
942e5fd9fc
Adding specific items into troubleshooting guide (#88105)
* Update troubleshooting.asciidoc

Adding items into the troubleshooting guide

* Resolve conflicts

* Reorganizes troubleshooting links

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2022-08-03 17:00:34 +02:00
David Turner
74ce7a4603
Fix typo (#89063) 2022-08-03 10:23:57 +01:00
Alexander Reelsen
9b02303138
Docs: Remove paragraph that applies only before Elasticsearch 7.0 (#86209) 2022-08-03 02:35:11 +09:30
Benjamin Trent
9ce59bb7a9
[ML] add text_similarity nlp task documentation (#88994)
Introduced in: #88439

* [ML] add text_similarity nlp task documentation

* Apply suggestions from code review

Co-authored-by: István Zoltán Szabó <istvan.szabo@elastic.co>

* Update docs/reference/ml/trained-models/apis/infer-trained-model.asciidoc

Co-authored-by: István Zoltán Szabó <istvan.szabo@elastic.co>

* Apply suggestions from code review

Co-authored-by: István Zoltán Szabó <istvan.szabo@elastic.co>

* Update docs/reference/ml/ml-shared.asciidoc

Co-authored-by: István Zoltán Szabó <istvan.szabo@elastic.co>

Co-authored-by: István Zoltán Szabó <istvan.szabo@elastic.co>
2022-08-02 12:17:14 -04:00
Leaf-Lin
44c8d19b6d
Update snapshots.asciidoc (#87584)
Adding a typo ``` in the doc
2022-08-02 11:24:31 +02:00
Leaf-Lin
00eefdd9a0 Revert "Add warning on restarting nodes > low watermark"
This reverts commit a3555eca6b.
2022-08-02 16:44:14 +10:00
Leaf-Lin
a3555eca6b
Add warning on restarting nodes > low watermark
As per https://github.com/elastic/elasticsearch/issues/49972 and https://github.com/elastic/elasticsearch/issues/56578, if a node is above low disk threshold when being restarted (rolling restart, network disruption or crash), the disk threshold decider prevents reusing the shard content on the restarted node.

The consequence of the event is the node may take a long time to start.
2022-08-02 16:36:27 +10:00
David Turner
d5ea39b2e8
Clean up network setting docs (#88929)
Clean up network setting docs

- Add types for all params
- Remove mention of JDKs before 11
- Clarify some wording

Co-authored-by: Stef Nestor <steffanie.nestor@gmail.com>
2022-08-01 19:59:50 +01:00
Christos Soulios
ad2dc834a7
Add synthetic_source support to aggregate_metric_double fields (#88909)
This PR implements synthetic_source support to the aggregate_metric_double
field type

Relates to #86603
2022-08-01 20:42:25 +03:00
Lee Hinman
3420be0ca5
Fix renaming data streams with CCR replication (#88875)
This commit fixes the situation where a user wants to use CCR to replicate indices that are part of
a data stream while renaming the data stream. For example, assume a user has an auto-follow request
that looks like this:

```
PUT /_ccr/auto_follow/my-auto-follow-pattern
{
  "remote_cluster" : "other-cluster",
  "leader_index_patterns" : ["logs-*"],
  "follow_index_pattern" : "{{leader_index}}_copy"
}
```

And then the data stream `logs-mysql-error` was created, creating the backing index
`.ds-logs-mysql-error-2022-07-29-000001`.

Prior to this commit, replicating this data stream means that the backing index would be renamed to
`.ds-logs-mysql-error-2022-07-29-000001_copy` and the data stream would *not* be renamed. This
caused a check to trip in `TransportPutLifecycleAction` asserting that a backing index was not
renamed for a data stream during following.

After this commit, there are a couple of changes:

First, the data stream will also be renamed. This means that the `logs-mysql-error` becomes
`logs-mysql-error_copy` when created on the follower cluster. Because of the way that CCR works,
this means we need to support renaming a data stream for a regular "create follower" request, so a
new parameter has been added: `data_stream_name`. It works like this:

```
PUT /mynewindex/_ccr/follow
{
  "remote_cluster": "other-cluster",
  "leader_index": "myotherindex",
  "data_stream_name": "new_ds"
}
```

Second, the backing index for a data stream must be renamed in a way that does not break the parsing
of a data stream backing pattern, whereas previously the index
`.ds-logs-mysql-error-2022-07-29-000001` would be renamed to
`.ds-logs-mysql-error-2022-07-29-000001_copy` (an illegal name since it doesn't end with the
rollover digit), after this commit it will be renamed to
`.ds-logs-mysql-error_copy-2022-07-29-000001` to match the renamed data stream. This means that for
the given `follow_index_pattern` of `{{leader_index}}_copy` the index changes look like:

| Leader Cluster | Follower Cluster |
|--------------|-----------|
| `logs-mysql-error` (data stream) | `logs-mysql-error_copy` (data stream) |
| `.ds-logs-mysql-error-2022-07-29-000001`      | `.ds-logs-mysql-error_copy-2022-07-29-000001` |

Which internally means the auto-follow request turned into the create follower request of:

```
PUT /.ds-logs-mysql-error_copy-2022-07-29-000001/_ccr/follow
{
  "remote_cluster": "other-cluster",
  "leader_index": ".ds-logs-mysql-error-2022-07-29-000001",
  "data_stream_name": "logs-mysql-error_copy"
}
```

Relates to https://github.com/elastic/elasticsearch/pull/84940 (cherry-picked the commit for a test)
Relates to https://github.com/elastic/elasticsearch/pull/61993 (where data stream support was first introduced for CCR)
Resolves https://github.com/elastic/elasticsearch/issues/81751
2022-08-01 09:17:50 -06:00
Ryan Ernst
e3c6726a71
Deprecate overriding DiscoveryPlugin internals (#88925)
DiscoveryPlugin allows extending getJoinValidator and
getElectionStrategies. These are implementation details of the system.
This commit deprecates these methods so that plugin authors are
discouraged from overriding them.
2022-07-30 06:30:34 +09:30
Ryan Ernst
e501609604
Deprecate network plugins (#88924)
Network plugins provide network implementations. In the past this has
been used for alternatives to netty based networking, using the JDK's
nio. However, nio has now been removed, and it is inadvisable for a
plugin to implement this low level part of the system.
Therefore, this commit marks the NetworkPlugin interface as deprecated.
2022-07-29 11:28:31 -07:00
Ryan Ernst
9f7cabacda
Add 8.5 migration docs (#88923)
This commit adds the a migration docs file for 8.5. This was copied from
the 8.4 file, which had no migration notes.
2022-07-29 11:59:32 +09:30
David Turner
7103053f03
Add troubleshooting docs about data corruption (#88760)
Adds some docs giving more detailed background about what data
corruption really means and some suggestions about how to narrow down
the root cause.

Co-authored-by: Henning Andersen <33268011+henningandersen@users.noreply.github.com>
2022-07-28 11:23:23 +01:00
Gilad Gal
c35cfc9fca
Update synthetic-source.asciidoc (#88880)
* Update synthetic-source.asciidoc

* Update docs/reference/mapping/fields/synthetic-source.asciidoc

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>

Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
2022-07-28 10:35:10 +03:00
Dimitris Athanasiou
3f9334012f
[ML] Fix version substitution in put DFA docs (#88862)
This fixes the version substitution in a couple of response examples in
the put DFA docs.
2022-07-28 01:37:30 +09:30
David Turner
41a607af2e
Fix typo (missing word) (#88034) 2022-07-28 00:53:35 +09:30
Mary Gouseti
89903bbe23
Troubleshooting docs for ACTION_RESTORE_FROM_SNAPSHOT (#87692)
Troubleshooting guide to restore indices and data streams that have
missing data from a snapshot.

This will be associated with the user action
`ACTION_RESTORE_FROM_SNAPSHOT`.

Preview link:
https://elasticsearch_87692.docs-preview.app.elstc.co/guide/en/elasticsearch/reference/master/restore-from-snapshot.html
2022-07-27 23:37:08 +09:30
Mary Gouseti
0f670404f6
Fix Note in troubleshooting docs (#88846) 2022-07-27 14:31:06 +02:00
Tanguy Leroux
7382fa3a32
[Doc] Precise that shared cache is shared across shards, not nodes (#88834) 2022-07-27 10:10:01 +02:00
debadair
9fc5e2f75b
[DOCS] Fix link to AtomicRed JSON file (#88817)
* [DOCS] Fix link to AtomicRed JSON file

* Update docs/reference/eql/detect-threats-with-eql.asciidoc

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2022-07-26 10:54:18 -07:00
Keith Massey
e61bfcfab8
Documenting master_is_stable health API settings (#87901) 2022-07-26 12:02:38 -05:00
David Roberts
15e7b06b79
[ML] Add inference cache hit count to inference node stats (#88807)
The inference node stats for deployed PyTorch inference
models now contain two new fields: `inference_cache_hit_count`
and `inference_cache_hit_count_last_minute`.

These indicate how many inferences on that node were served
from the C++-side response cache that was added in
https://github.com/elastic/ml-cpp/pull/2305. Cache hits
occur when exactly the same inference request is sent to the
same node more than once.

The `average_inference_time_ms` and
`average_inference_time_ms_last_minute` fields now refer to
the time taken to do the cache lookup, plus, if necessary,
the time to do the inference. We would expect average inference
time to be vastly reduced in situations where the cache hit
rate is high.
2022-07-26 17:53:43 +01:00
Julie Tibshirani
abd561a277
Support kNN vectors in disk usage action (#88785)
This change adds support for kNN vector fields to the `_disk_usage` API. The
strategy:
* Iterate the vector values (using the same strategy as for doc values) to
estimate the vector data size
* Run some random vector searches to estimate the vector index size 

Co-authored-by: Yannick Welsch <yannick@welsch.lu>

Closes #84801
2022-07-26 07:57:47 -07:00
Pooya Salehi
806d2976aa
Remove Blocks when disk threshold monitoring is disabled (#87841)
This change ensures that existing read_only_allow_delete blocks that
are placed on indices when the flood_stage watermark threshold is
exceeded, are removed when the disk threshold monitoring is disabled.

This is done by changing how InternalClusterInfoService behaves when
disabled. With this change, it will keep calling the registered
listeners periodically, but with an empty ClusterInfo.

Closes #86383
2022-07-26 14:26:43 +02:00
Artem Prigoda
72a6fdc2b8
Support "dry run" mode for updating Desired Nodes (#88305)
Add the dry_run query parameter to support simulating of updating of desired nodes. The update request will be validated, but no cluster state updates will be performed. In order to indicate that the response was a result of a dry run, we add the dry_run run field to the JSON representation of a response.

See #82975
2022-07-26 09:03:12 +02:00
James Baiera
6ce5f73e97
Add health user action for unhealthy SLM policy failure counts (#88523)
This PR adds a user action to the SLM health indicator which checks each SLM policy's invocations 
since last success field and reports degraded health (YELLOW) in the event that any policy is at or 
above the failure threshold (default is 5 failures in a row).
2022-07-25 15:58:20 -04:00
Benjamin Trent
46fc42b817
[ML] Make bucket_count_ks_test aggregation generally available (#88657)
Initially released in 7.14, bucket_count_ks_test is now generally available.
2022-07-25 13:30:48 -04:00
Keith Massey
4b060a6046
Removing the notion of components from the health API (#88663)
This commit removes the notion of components from the health API. They are gone from being
a top-level field in the response, and indicators is promoted into its place.
2022-07-25 12:29:06 -05:00
Navanit Dubey
9afb01e14e
Update rank-eval.asciidoc (#88771) 2022-07-25 18:00:49 +02:00
Nikolaj Volgushev
b04c0f3c3a
Increase http.max_header_size default to 16kb (#88725)
Our current default for the http.max_header_size setting is 8kb. This
is lower than the current default for Kibana (16kb in 8.x), and the ESS
proxy (1mb based on the Go http library default). To align with the
current convention of other Elastic components, this PR increases the
ES header size setting default to 16kb.

Closes #88501
2022-07-25 12:57:28 +02:00
Rory Hunter
7049e6f38d Add release notes for 8.3.3 (#88599)
Add release notes for 8.3.3
2022-07-25 11:06:29 +01:00
Andrei Dan
da765ced7f
Remove help_url,rename summary to symptom, and user_actions to diagnosis (#88553)
Remove help_url,rename summary->symptom,user_actions->diagnosis
Separate the diagnosis `message` field in `cause` and `action`
Co-authored-by: Mary Gouseti <mgouseti@gmail.com>
2022-07-25 10:35:16 +01:00
Iraklis Psaroudakis
f284cc16f4
Convert disk watermarks to RelativeByteSizeValues (#88719)
* Convert disk watermarks to RelativeByteSizeValues

Similar to the existing watermark setting for the frozen tier.

Pre-requisite for PR 88639 that plans to introduce max headroom
settings for the disk watermarks, similar to the frozen tier max
headroom setting.

* Add changelog

* Revert 20gb to 20GB

* Make formatNoTrailingZerosPercent non static

* ByteSizeValue.MINUS_ONE

* Remove getMinimumTotalSizeForBelowWatermark

* Remove comment

* Fix minor stuff

* Make parsing of RelativeByteSizeValue faster

Mimicks older definitelyNotPercentage function

* Remove Locale from Strings.format

* More MINUS_ONE
2022-07-22 18:39:07 +03:00
Julie Tibshirani
e3ede67262
Integrate ANN into _search endpoint (#88694)
This PR adds a new `knn` option to the `_search` API to support ANN search.
It's powered by the same Lucene ANN capabilities as the old `_knn_search`
endpoint. The `knn` option can be combined with other search features like
queries and aggregations.

Addresses #87625
2022-07-22 08:02:07 -07:00
Elasticsearch addict
e3dc098a0a
Tasks doc: fix a mistake about the reindex task description (#88669) 2022-07-22 12:17:00 +02:00
eltomello
df7ea6afcd
[DOCS] Fix transform painless example syntax (#88364)
Corrects the syntax of an example for a scripted metric aggregation.
2022-07-21 08:05:17 -07:00
Benjamin Trent
239d45a019
[ML] make bucket_correlation aggregation generally available (#88655)
Originally released in 7.14, bucket_correlation is now generally available.
2022-07-21 07:20:09 -04:00
Benjamin Trent
94f2544998
Adding cardinality support for random_sampler agg (#86838)
This adds support for the `cardinality` aggregation within a random_sampler.

This usecase is helpful in determining the ratio of unique values compared to the count of total documents within the sampled set.
2022-07-21 07:19:35 -04:00
Abdon Pijpelink
0eca582326
[DOCS] Remove camel case variations (#88650)
* [DOCS] Remove camel case variations. Closes #73417

* [DOCS] Switch to sentence casing in titles
2022-07-20 17:06:34 +02:00
Seth Michael Larson
fffabae10a
Add pagination parameters to API spec and docs for 'snapshot.get' API 2022-07-20 06:35:52 -05:00
Benjamin Trent
a044b5c01e
[ML] make composite aggs in datafeeds Generally Available (#88589)
Commit makes composite aggs in datafeeds generally available.
2022-07-19 12:41:25 -04:00
Adam Locke
1441367d0b
[DOCS] Add minimal security steps back to docs (#88393)
* [DOCS] Add minimal security steps back to docs

* Update instructions to use reset password tool

* Update setting built-in user passwords with the es reset passwords tool

* Revert "Update setting built-in user passwords with the es reset passwords tool"

This reverts commit 51b72fdfdf.

* Address review feedback and make clearer distinctions between security configurations
2022-07-19 10:01:34 -04:00