Commit graph

319 commits

Author SHA1 Message Date
David Turner
d4069ef08c
Add note on troubleshooting laggy cancellations (#97485) (#97499)
Today we document that tasks may not react to cancellations immediately,
but in practice it's surprising to users and kind of a bug if they run
for too long after being cancelled. This commit adds a little extra
detail about the information to collect to troubleshoot such a
situation.
2023-07-10 07:09:36 -04:00
Mary Gouseti
17fde1ef31
Tasks doc: fix a mistake about the reindex task description (#88669) (#88720)
Authored-by: Elasticsearch addict <amitmbm87@gmail.com>
2022-07-22 13:29:21 +02:00
David Turner
b3979c3f0c
Small fixes to clear voting config excls API (#87828) (#87834)
Fixes the name of the REST param in the error message, and expands the
API docs to emphasise that the exclusions should be empty in normal
operation.
2022-06-20 06:32:17 -04:00
Rene Groeschke
c37d2626b1
[7.17] Port gradle docs test plugin to use internal yaml rest test plugin (#86598) (#86678)
Backports the following commits to 7.17:
 - Port gradle docs test plugin to use internal yaml rest test plugin (#86598)
2022-05-11 15:42:03 +02:00
James Rodewig
5afdc76014
Document partial search results with skip_unavailable (#84057) (#84300)
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>
(cherry picked from commit 86964c9752)

Co-authored-by: Nhat Nguyen <nhat.nguyen@elastic.co>
2022-02-23 10:43:20 -05:00
James Rodewig
53ed187d63
[DOCS] Fix typos (#83895) (#83975)
Co-authored-by: Tobias Stadler <ts.stadler@gmx.de>
2022-02-15 13:05:01 -05:00
David Turner
3f33dfc148
Clarify cluster state API docs (#82930) (#82952)
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:22:20 -05:00
James Rodewig
8feb6c54aa
[DOCS] Re-add cluster settings precedence (#82738) (#82748)
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

(cherry picked from commit e21a9a0711)
2022-01-18 13:24:55 -05:00
Jake Landis
dd31a014f1
[docs] clarify purged http stats (#82123) (#82211) 2022-01-04 11:03:27 -05:00
Artem Prigoda
47da0dca20
[7.16] Revert "Deprecate returning 408 for a server timeout on _cluster/health (#78180)" (#80831)
* Revert "Allow deprecation warning for the return_200_for_cluster_health_timeout parameter (#80178) (#80445)"

This reverts commit 5a5300753d.

* Revert "[7.x] Use query param instead of a system property for opting in for new cluster health response code (#79397) (#79435)"

This reverts commit d8c14281

* Revert "[7.x] Deprecate returning 408 for a server timeout on `_cluster/health` (#78180) (#78940)"

This reverts commit 03bd55d1
2021-11-18 16:57:39 +01:00
James Rodewig
39397f9462
[DOCS] Un-deprecate transient cluster settings (#80766)
#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
2021-11-16 15:47:23 -05:00
Nikola Grcevski
581e785022
[7.16] Undo transient settings deprecation (#80558) (#80570)
Remove transient settings deprecation message from logs
and upgrade assistant.
2021-11-09 20:30:56 -05:00
James Rodewig
ff0b01ce40
[DOCS] Add transient settings migration guide (#80091)
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:06:12 -04:00
James Rodewig
3f264ba21b
[DOCS] Update ESS best practice for dynamic cluster settings (#79579) (#79839)
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>

Co-authored-by: David Kilfoyle <41695641+kilfoyle@users.noreply.github.com>
2021-10-26 12:08:01 -04:00
Artem Prigoda
d8c1428136
[7.x] Use query param instead of a system property for opting in for new cluster health response code (#79397) (#79435)
Backport #79351 to 7.x:

The original change was implemented in #78940, but we have decided to move from a system property
to a request parameter, so Cloud users/clients have an easier way to opt-in for the new status code.

Relates #70849
2021-10-19 14:21:34 +01:00
Artem Prigoda
bcaf956e49
Revert "[7.x] Use query param instead of a system property for opting in for new cluster health response code (#79397)" (#79432)
This reverts commit fbe49d15b0.
2021-10-19 10:15:58 +02:00
Artem Prigoda
fbe49d15b0
[7.x] Use query param instead of a system property for opting in for new cluster health response code (#79397)
Backport #79351 to 7.x:

The original change was implemented in #78940, but we have decided to move from a system property
to a request parameter, so Cloud users/clients have an easier way to opt-in for the new status code.

Relates #70849
2021-10-18 23:52:12 +02:00
Nikola Grcevski
8512037aaa
[7.x] Deprecation of transient cluster settings (#78794) (#79288)
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 19:06:33 -04:00
David Turner
f454bd97e6
Add tests/fix docs for nodes info API (#79273)
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.

Backport of #79223
Closes #79187

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-10-15 13:37:03 -04:00
David Turner
839f97b634 Revert "Add tests/fix docs for nodes info API (#79223)"
This reverts commit 8f41ab1b8d.
2021-10-15 16:49:19 +01:00
David Turner
8f41ab1b8d 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 16:00:38 +01:00
Keith Massey
2317fdf943
Changing name of shards field in node/stats api to shard_stats #78531 (#78806)
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 #78531
2021-10-06 19:53:12 -05:00
James Rodewig
6871936829
Adding priority list and executing description to the pending tasks doc (#74456) (#78260)
* 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:16:26 -04:00
David Turner
8e9eb808ee 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:56:40 +01:00
James Rodewig
6662d95576
[DOCS] Clarify usage of optional human readable jvm uptime metric in Nodes Stats API (#76545) (#76761)
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>

Co-authored-by: Peter Dyson <peter.dyson@geekpete.com>
Co-authored-by: Adam Locke <adam.locke@elastic.co>
2021-08-20 09:06:46 -04:00
Dan Hermann
aafc849383
[DOCS] HTTP client stats (#70512) (#76263) 2021-08-11 15:09:50 -05:00
David Turner
cee74ecc00 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:42:37 +01:00
Keith Massey
a8a21d804f
Report shard count per node in _nodes/stats (#75760)
Backporting _nodes/stats feature

This commit cherry-picks the commit from https://github.com/elastic/elasticsearch/pull/75433, and changes it to apply to 7.15 and later.
2021-07-28 09:02:51 -05:00
James Rodewig
3182482701
[DOCS] Update alias references (#73427) (#73502)
Updates several `index aliases` references to `aliases`.
2021-05-27 17:57:51 -04:00
David Turner
6d8b841c48 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:36:19 +01:00
James Rodewig
73e140bdff
[DOCS] Rename mount types for searchable snapshots (#72699) (#72773)
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:46:23 -04:00
David Turner
9158c4ea65 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:42:55 +01:00
Luca Cavanna
1c5a8685e8
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 18:25:57 +02:00
James Rodewig
c757f9e4e7
[DOCS] Fix double spaces (#71082) (#71120) 2021-03-31 11:43:34 -04:00
Henning Andersen
44ed2435a9
Total data set size in stats (#70625) (#71057)
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-31 12:08:57 +02:00
James Rodewig
21f1d85d6d
[DOCS] Remove dupe wait_for_completion def (#71012) (#71048) 2021-03-30 07:54:12 -04:00
James Rodewig
295e80b727
[DOCS] Add operator privileges to APIs and settings (#69903) (#70389) 2021-03-15 10:22:00 -04:00
James Rodewig
5ace14c46f [DOCS] Reword ingest description 2021-03-09 13:15:06 -05:00
Luca Cavanna
eb532691d7
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:40:54 +01:00
Yannick Welsch
1b566ce3c1
Support include_unloaded_segments in node stats (#69682) (#69721)
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-02 08:38:52 +01:00
James Rodewig
45d93d9458
[DOCS] Remove added admons (#69452) (#69454) 2021-02-23 10:48:36 -05:00
David Roberts
5bce45b9ce
Add processor architectures to cluster stats (#68351)
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.

Backport of #68264
2021-02-02 13:26:17 +00:00
David Turner
b2861bc804 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:37:29 +00:00
Lee Hinman
1facf3f374
[7.x] Add index creation version stats to cluster stats (#68141) (#68161)
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 15:38:56 -07:00
James Rodewig
991cb246b9
[DOCS] Add security privileges to cluster API docs (#67589) (#67707) 2021-01-19 10:35:18 -05:00
Ioannis Kakavas
c0b24df307
Ensure CI is run in FIPS 140 approved only mode (#66804)
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-24 15:35:28 +02:00
James Rodewig
2277551a98
[DOCS] Fix timeout parameter defaults (#66111) (#66690) 2020-12-21 09:20:43 -05:00
James Rodewig
0d708b9582
[DOCS] Fix formatting (#66450) (#66453) 2020-12-16 11:22:43 -05:00
Adam Locke
52e536910c
[DOCS] Add description for node info settings. (#66362) (#66375) 2020-12-15 11:45:10 -05:00
James Rodewig
050c7ebe23
[DOCS] Correct the default value of wait_for_completion query param (#65800) (#65902)
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

Co-authored-by: bellengao <gbl_long@163.com>
2020-12-04 17:14:42 -05:00