Commit graph

315 commits

Author SHA1 Message Date
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
James Rodewig
3e34247570
[DOCS] Add security privileges to cluster API docs (#67589) 2021-01-19 10:18:59 -05:00
Ioannis Kakavas
bd873698bc
Ensure CI is run in FIPS 140 approved only mode (#64024)
We were depending on the BouncyCastle FIPS own mechanics to set
itself in approved only mode since we run with the Security
Manager enabled. The check during startup seems to happen before we
set our restrictive SecurityManager though in
org.elasticsearch.bootstrap.Elasticsearch , and this means that
BCFIPS would not be in approved only mode, unless explicitly
configured so.

This commit sets the appropriate JVM property to explicitly set
BCFIPS in approved only mode in CI and adds tests to ensure that we
will be running with BCFIPS in approved only mode when we expect to.
It also sets xpack.security.fips_mode.enabled to true for all test clusters
used in fips mode and sets the distribution to the default one. It adds a
password to the elasticsearch keystore for all test clusters that run in fips
mode.
Moreover, it changes a few unit tests where we would use bcrypt even in
FIPS 140 mode. These would still pass since we are bundling our own
bcrypt implementation, but are now changed to use FIPS 140 approved
algorithms instead for better coverage.

It also addresses a number of tests that would fail in approved only mode
Mainly:

    Tests that use PBKDF2 with a password less than 112 bits (14char). We
    elected to change the passwords used everywhere to be at least 14
    characters long instead of mandating
    the use of pbkdf2_stretch because both pbkdf2 and
    pbkdf2_stretch are supported and allowed in fips mode and it makes sense
    to test with both. We could possibly figure out the password algorithm used
    for each test and adjust password length accordingly only for pbkdf2 but
    there is little value in that. It's good practice to use strong passwords so if
    our docs and tests use longer passwords, then it's for the best. The approach
    is brittle as there is no guarantee that the next test that will be added won't
    use a short password, so we add some testing documentation too.
    This leaves us with a possible coverage gap since we do support passwords
    as short as 6 characters but we only test with > 14 chars but the
    validation itself was not tested even before. Tests can be added in a followup,
    outside of fips related context.

    Tests that use a PKCS12 keystore and were not already muted.

    Tests that depend on running test clusters with a basic license or
    using the OSS distribution as FIPS 140 support is not available in
    neither of these.

Finally, it adds some information around FIPS 140 testing in our testing
documentation reference so that developers can hopefully keep in
mind fips 140 related intricacies when writing/changing docs.
2020-12-23 21:00:49 +02:00
James Rodewig
10b036e934
[DOCS] Fix timeout parameter defaults (#66111) 2020-12-21 09:02:06 -05:00
bellengao
d14492ca13
[DOCS] Fix some typos in docs (#66672) 2020-12-21 12:45:51 +02:00
James Rodewig
7c0f193b2c
[DOCS] Fix formatting (#66450) 2020-12-16 11:09:55 -05:00
Adam Locke
be3bc46111
[DOCS] Add description for node info settings. (#66362) 2020-12-15 11:27:42 -05:00
bellengao
e198bb233e
[DOCS] Correct the default value of wait_for_completion query param (#65800)
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2020-12-04 15:52:35 -05:00
James Rodewig
0f406f1734
[DOCS] Add cluster get settings API example (#65754) 2020-12-02 10:37:01 -05:00
James Rodewig
72621873fd
[DOCS] Remove erroneous flat_settings query param (#65670) (#65745)
Co-authored-by: Thiago Souza <thiago@elastic.co>
2020-12-02 09:42:35 -05:00
Wylie Conlon
10ee0f2878
Clarify field data cache behavior in docs (#64375)
* Clarify that field data cache includes global ordinals
* Describe that the cache should be cleared once the limit is reached
* Clarify that the `_id` field does not supported aggregations anymore
* Fold the `fielddata` mapping parameter page into the `text field docs
* Improve cross-linking
2020-11-20 13:53:23 -08:00
James Rodewig
1ea83359bb
[DOCS] Fix case for 'Boolean' (#64299) 2020-10-29 09:04:43 -04:00