Commit graph

326 commits

Author SHA1 Message Date
David Turner
6f0cee0fae
Add master_timeout support to voting config exclusions APIs (#86670)
Today the add/clear voting config exclusions APIs route a request to the
master node but do not expose the usual `?master_timeout` parameter
allowing to change the timeout for this phase of execution. This commit
adds the missing parameter.
2022-05-11 13:56:50 +01:00
Rene Groeschke
62d5aa986c
Port gradle docs test plugin to use internal yaml rest test plugin (#86598)
Remove usage of deprecated elasticsearch.rest-test in DocsTestPlugin

we keep some files in src/test in docs projects as moving them would require more changes
in build-docs project outside this repository
2022-05-11 12:01:23 +02:00
Gabi Davar
43ab984639
Add documentation for "io_time_in_millis" (#84911)
Add documentation for "io_time_in_millis"

Co-authored-by: Adam Locke <adam.locke@elastic.co>
2022-04-25 16:43:19 +01:00
Ryan Ernst
d60cde6681
Remove flavor from build (#85796)
The default distribution is the only remaining build flavor, and has been for
quite a while now. This commit removes flavor from the internal Build
class. It keeps rest api compat for nodes info for now by hardcoding
`default`.
2022-04-11 16:46:55 -07:00
Ryan Ernst
cf3dc57132
Remove no-jdk deprecations (#85765)
The no-jdk distributions exist in 7.x and before. They were removed with
8.0. This commit removes the remaining deprecation messages for using
the no-jdk distribution. Note that when talking with an older node, we
drop the bundledJdk attribute. This is ok because it is only possible
for this to not be true when talking with a 7.17 node, during an upgrade,
and the usingBundledJdk is retained, which is the important thing if
debugging a problem.

relates #76896
relates #85758
2022-04-11 14:52:31 -07:00
Mary Gouseti
ed0bb2a8af
Push back excessive requests for stats (#83832)
Resolves #51992
2022-02-28 08:46:18 +01:00
Nhat Nguyen
86964c9752
Document partial search results with skip_unavailable (#84057)
This commit adds an explanation for the relation between `allow_partial_search_results` and `skip_unavailable` in CCS requests.

Relates to #33915

Closes #82407

Co-authored-by: James Rodewig <james.rodewig@elastic.co>
2022-02-23 10:04:52 -05:00
David Turner
02f38e3da9
Make allocation explanations more actionable (#83983)
The cluster allocation explain API includes a top-level status
indicating to the user whether the shard can be assigned/rebalanced/etc
or not. Today this status is fairly terse and experience shows that
users sometimes struggle to understand how to interpret it and to decide
on follow-up actions.

This commit makes the top-level explanation more detailed and
actionable. For instance, in the cases like `THROTTLED` where the status
is transient we instruct the user to wait; if a shard is lost we say to
restore it from a snapshot; if a shard cannot be assigned we say to
choose a specific node where its assignment is expected and to address
the obstacles.

Co-authored-by: James Rodewig <james.rodewig@elastic.co>
2022-02-22 09:23:01 +00:00
Tobias Stadler
e3deacf547
[DOCS] Fix typos (#83895) 2022-02-15 12:42:17 -05:00
Mark Vieira
fcf1380492 Fix documentation snippet tests 2022-02-02 13:29:02 -08:00
Francisco Fernández Castaño
520b8435d0
Add desired nodes API (#82975)
This commit adds the Desired Nodes API, allowing orchestrators
that manage Elasticsearch clusters to let the system know about the
current/planned topology that the cluster will run on.
This allows the system to take better decisions based on the entire
cluster topology, including nodes that will be added/removed in the
near future.
2022-02-01 17:54:57 +01:00
David Turner
dc26886ee1
Clarify cluster state API docs (#82930)
The `GET _cluster/state` API is really only suitable for debugging or
diagnostics. Its response format is not documented since it changes
fairly freely between versions.

Today we mention in its docs that this API is unstable, and deliberately
omit a description of its response format, but we don't explicitly say
that it's only for diagnostics and is unsuitable for consumption by
external tools that might try and use it for monitoring.

This commit adjusts the docs to give some more explicit guidance about
how it should and shouldn't be used.
2022-01-24 10:09:45 -05:00
James Rodewig
e21a9a0711
[DOCS] Re-add cluster settings precedence (#82738)
Adds some tags and an include statement to re-add cluster settings precedence information to the cluster update settings API page. This should aid with discoverability.

Closes https://github.com/elastic/elasticsearch/issues/82634

Relates to https://github.com/elastic/elasticsearch/pull/79579
2022-01-18 12:32:43 -05:00
Jake Landis
fd6f04bb24
[docs] clarify purged http stats (#82123) 2022-01-04 09:51:41 -06:00
Olivier Cavadenti
90e4e8ce63
Add index pressure stats in cluster stats (#80303)
`GET _nodes/stats` returns statistics about indexing pressure for each node.
With this commit `GET _cluster/stats` now returns stats about indexing pressure
computed by aggregating the indexing pressure stats of each node in the
cluster.

Closes #79788
2021-12-09 12:41:08 +00:00
David Turner
54e0370b3e
Track histogram of transport handling times (#80581)
Adds to the transport node stats a record of the distribution of the
times for which a transport thread was handling a message, represented
as a histogram.

Closes #80428
2021-11-29 15:41:33 +00:00
Artem Prigoda
89bbac9216
Revert "Return 200 OK response code for a cluster health timeout (#78968)" (#80821)
* Revert "Return 200 OK response code for a cluster health timeout (#78968)"

This reverts commit a2c3daea

* Revert "Allow deprecation warning for the return_200_for_cluster_health_timeout parameter (#80178)"

This reverts commit 1c711e35fc.

* Revert "Drop pre-7.2.0 wire format in ClusterHealthRequest (#79551)"

This reverts commit b9fbe66ab0.

* Revert "Adjust the BWC version for the return200ForClusterHealthTimeout field (#79436)"

This reverts commit f60bda5685.

* Revert "Use query param instead of a system property for opting in for new cluster health response code (#79351)"

This reverts commit 8901a999

* Revert "Deprecate returning 408 for a server timeout on `_cluster/health` (#78180)"

This reverts commit f266eb32

* Drop pre-7.2.0 wire format in ClusterHealthRequest (#79551)

This reverts commit fa4d562c

* Revert "Disable BWC for #80821 (#80839)"

This reverts commit cb0e73e2fc.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2021-11-18 19:55:16 +01:00
James Rodewig
2f4143267e
[DOCS] Un-deprecate transient cluster settings (#80766) (#80780)
#80556 reverted the deprecation of transient cluster settings. This replaces deprecation language in the docs with a warning/recommendation to avoid transient settings.

Closes #80557
# Conflicts:
#	docs/reference/migration/migrate_7_16.asciidoc
2021-11-16 16:00:13 -05:00
Nikola Grcevski
3308dd5c00
Undo transient settings deprecation (#80558)
This change removes the deprecation warning when calling
the cluster settings APIs with transient settings.

Relates to #80556
2021-11-09 17:07:55 -05:00
Stuart Tettemer
30e15ba838
Script: Time series compile and cache evict metrics (#79078)
Collects compilation and cache eviction metrics for
each script context.

Metrics are available in _nodes/stats in 5m/15m/1d
buckets.

Refs: #62899
2021-11-03 13:13:42 -05:00
James Rodewig
cb6347b3da
[DOCS] Add transient settings migration guide (#80091) (#80272)
Changes:

* Adds a transient settings migration guide to the 7.16 docs.
* Updates the related deprecation docs to link to the guide.

Closes #80055

Relates to #79167.
2021-11-03 09:23:25 -04:00
James Rodewig
8f23448870
[DOCS] Update ESS best practice for dynamic cluster settings (#79579)
Changes:

* Updates a tip in the configuration docs to point Cloud users to the [edit user settings](https://www.elastic.co/guide/en/cloud/current/ec-add-user-settings.html) feature.
* Removes some duplicate content from the cluster update settings API docs.

Relates to https://github.com/elastic/cloud/pull/90394

Co-authored-by: David Kilfoyle <41695641+kilfoyle@users.noreply.github.com>
2021-10-26 11:57:42 -04:00
Artem Prigoda
8901a9998e
Use query param instead of a system property for opting in for new cluster health response code (#79351)
The original change was implemented in #78940, bu we have decided to move from a system property to an a request parameter, so Cloud users/clients have an easier way to opt-in for the new status code.

Relates #70849
2021-10-18 22:43:59 +02:00
David Roberts
e86de065cf
Allow total memory to be overridden (#78750)
Since #65905 Elasticsearch has determined the Java heap settings
from node roles and total system memory.

This change allows the total system memory used in that calculation
to be overridden with a user-specified value. This is intended to
be used when Elasticsearch is running on a machine where some other
software that consumes a non-negligible amount of memory is running.
For example, a user could tell Elasticsearch to assume it was
running on a machine with 3GB of RAM when actually it was running
on a machine with 4GB of RAM.

The system property is `es.total_memory_bytes`, so, for example,
could be specified using `-Des.total_memory_bytes=3221225472`.
(It is specified in bytes rather than using a unit, because it
needs to be parsed by startup code that does not have access to
the utility classes that interpret byte size units.)
2021-10-16 12:01:37 +01: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
David Turner
5767d51c2b
Add tests/fix docs for nodes info API (#79223)
The docs for `GET _nodes/<node>/<metric>` omitted a couple of metrics
and indicated that this API returned dynamic stats rather than static
info. They also didn't mention that `_all` is a legal value, nor
did it give a way to suppress all metrics even though this is possible.

This commit adjusts the docs and adds tests to ensure that selecting
metrics works as expected and to ensure that there is a future-proof
legal way to suppress all metrics.

Closes #79187

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-10-15 15:57:52 +01:00
Keith Massey
4df15f5177
Changing name of shards field in node/stats api to shard_stats (#78531)
If the _nodes/stats API received a level=shards request parameter, then the response would have two "shards" fields,
which would cause problems with json parsers. This commit renames the "shards" field that currently only contains
"total_count" to "shard_stats".
Relates #78311 #75433
2021-10-06 17:19:04 -05:00
James Rodewig
b3cdf60ab3
Adding priority list and executing description to the pending tasks doc (#74456) (#78259)
* Adding priority to the pending tasks doc

https://github.com/elastic/elasticsearch/pull/19448#discussion_r70969307
917fea7c5d/core/src/main/java/org/elasticsearch/common/Priority.java (L29)

* Adding executing into the cluster pending tasks

* Update docs/reference/cluster/pending.asciidoc

Co-authored-by: Henning Andersen <33268011+henningandersen@users.noreply.github.com>

Co-authored-by: Henning Andersen <33268011+henningandersen@users.noreply.github.com>

Co-authored-by: Leaf-Lin <39002973+Leaf-Lin@users.noreply.github.com>
Co-authored-by: Henning Andersen <33268011+henningandersen@users.noreply.github.com>
2021-09-23 11:17:18 -04:00
David Turner
4a17847b85
Add timing stats to publication process (#76771)
This commit introduces into the node stats API various statistics to
track the time that the elected master spends in various phases of the
cluster state publication process.

Relates #76625
2021-08-23 17:38:32 +01:00
Peter Dyson
cad55c8393
[DOCS] Clarify usage of optional human readable jvm uptime metric in Nodes Stats API (#76545)
To return the JVM `uptime` metric, the `human` query parameter must be `true`.

Co-authored-by: Adam Locke <adam.locke@elastic.co>
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-08-20 08:55:23 -04:00
David Turner
95edc6deb2
Clarify allocation explain if random shard chosen (#75670)
Today we often encounter users that are confused by the behaviour of
calling `GET _cluster/allocation/explain` without a body: it _seems_ to
work, but it explains a random shard, and if this isn't the shard
they're thinking of then it's unclear how to proceed.

With this commit we add a note to the response when a shard was randomly
chosen indicating that it is possible, and possibly useful, to explain a
different shard. We also adjust the exception message in the case when
all shards are assigned to indicate why it's an invalid request and what
to do to make it valid.
2021-08-02 15:14:09 +01:00
Adrien Grand
d15445e0f3
Remove usage of RAM accounting of segments (#75674)
This is a pre-requisite for the upgrade to Lucene 9, which removes the ability to estimate RAM usage of segments.
2021-07-29 08:36:09 +02:00
Keith Massey
ddc3b37580
Adding shard count to node stats api (#75433)
* Adding shard count to _nodes/stats api

Added a shards section to each node returned by the _nodes/stats api. Currently this new section only contains a total count of all shards on the node.
2021-07-27 10:39:53 -05:00
James Rodewig
5729bb8d49
[DOCS] Update alias references (#73427)
Updates several `index aliases` references to `aliases`.
2021-05-27 16:00:57 -04:00
David Turner
b2956b3ae7
Identify cancelled tasks in list tasks API (#72931)
This commit adds a `cancelled` flag to each cancellable task in the
response to the list tasks API, allowing users to see that a task has
been properly cancelled and will complete as soon as possible.

Closes #72907
2021-05-17 11:02:50 +01:00
James Rodewig
ba66669eb3
[DOCS] Rename mount types for searchable snapshots (#72699)
Changes:

* Renames 'full copy searchable snapshot' to 'fully mounted index.'
* Renames 'shared cache searchable snapshot' to 'partially mounted index.'
* Removes some unneeded cache setup instructions for the frozen tier. We added a default cache size with #71844.
2021-05-05 16:35:33 -04:00
David Turner
dd7f555ca5
Open with better cluster allocation explain ex. (#72245)
Today the only example of calling the cluster allocation explain API above the
fold is the bare `GET /_cluster/allocation/explain` which kind of works but is
not usually what the user wants. This commit changes the docs so that we open
with an example showing how we usually expect it to be called. This will make
it clearer that you should normally specify exactly for which shard you want an
explanation. It also tidies up a few other wrinkles in these docs.

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-04-26 17:41:22 +01:00
Luca Cavanna
6422fd5df2
Output script stats for indexed fields (#71219)
We have recently introduced the ability to associate an indexed field with a script. This commit updates the existing mappings stats to output stats about the script, similar to what we already do for runtime fields.
2021-04-12 13:32:50 +02:00
James Rodewig
693807a6d3
[DOCS] Fix double spaces (#71082) 2021-03-31 09:57:47 -04:00
Henning Andersen
0f28e97857
Total data set size in stats (#70625)
With shared cache searchable snapshots we have shards that have a size
in S3 that differs from the locally occupied disk space. This commit
introduces `store.total_data_set_size` to node and indices stats, allowing to
differ between the two.

Relates #69820
2021-03-30 15:23:29 +02:00
James Rodewig
69db7ce171
[DOCS] Remove dupe wait_for_completion def (#71012) 2021-03-30 06:46:57 -04:00
Dan Hermann
8ff7360901
[DOCS] HTTP client stats (#70512) 2021-03-19 06:22:17 -05:00
James Rodewig
d51a04cd8c
[DOCS] Add operator privileges to APIs and settings (#69903) 2021-03-15 09:20:09 -04:00
James Rodewig
71bb0c7714 [DOCS] Reword ingest description 2021-03-09 13:14:23 -05:00
Luca Cavanna
ffe61fb097
Move runtime fields stats to server (#69487)
Runtime fields usage is currently reported as part of the xpack feature usage API. Now that runtime fields are part of server, their corresponding stats can be moved to be part of the ordinary mapping stats exposed by the cluster stats API.
2021-03-08 12:38:20 +01:00
Yannick Welsch
529c6227fe
Support include_unloaded_segments in node stats (#69682)
Adds support for the include_unloaded_segments flag in node stats, which helps with understanding resource usage of
shared_cache-style searchable snapshots on a per-node basis.
2021-03-01 17:18:47 +01:00
James Rodewig
9af74ec561
[DOCS] Remove added admons (#69452) 2021-02-23 10:35:21 -05:00
David Roberts
6e392a317d
Add processor architectures to cluster stats (#68264)
This change adds a new "architectures" section to the
cluster stats, containing a summary of how many nodes
in the cluster are on each processor architecture.

The intention is to make it easier to see whether
clusters are running on aarch64, or mixed x86_64/aarch64,
which may aid support as aarch64 becomes more commonly
used.
2021-02-02 09:48:20 +00:00
David Turner
2adeb4a666
Expand and consolidate networking docs (#68051)
Today's network config docs are split into "Network", "HTTP" and
"Transport" pages, with unclear relationships between them. We often
encounter users with weird configs that indicate they don't really
understand how these settings all relate. In fact these pages are all
very interrelated, and the HTTP and Transport pages are almost all only
for advanced users. This commit brings these docs into a single page and
rewords some things to try and guide users away from the advanced
settings unless their configuration needs all the extra complexity.

It also adds a section entitled "Binding and publishing" which clarifies
the meanings of the `bind_host` and `publish_host` parameters. This is
also a common source of confusion amongst users.

It also clarifies that many of these settings accept a list of
addresses, and warns that this may not be what you want. Closes #67956.

Co-authored-by: Adam Locke <adam.locke@elastic.co>
2021-02-01 13:06:20 +00:00
Lee Hinman
ac1433d300
Add index creation version stats to cluster stats (#68141)
This commit adds statistics about the index creation versions to the `/_cluster/stats` endpoint. The
stats look like:

```
{
  "_nodes" : {
    "total" : 1,
    "successful" : 1,
    "failed" : 0
  },
  "indices" : {
    "count" : 3,
    ...
    "versions" : [
      {
        "version" : "8.0.0",
        "index_count" : 1,
        "primary_shard_count" : 2,
        "total_primary_size" : "8.6kb",
        "total_primary_bytes" : 8831
      },
      {
        "version" : "7.11.0",
        "index_count" : 1,
        "primary_shard_count" : 1,
        "total_primary_size" : "4.6kb",
        "total_primary_bytes" : 4230
      }
    ]
  },
  ...
}
```

(`total_primary_size` is only shown with the `?human` flag)

This is useful for telemetry as it allows us to see if/when a cluster has indices created on a
previous version that would need to be either upgraded or supported during an upgrade.
2021-01-28 13:58:21 -07:00