Commit graph

309 commits

Author SHA1 Message Date
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
James Rodewig
0ff19635d4
[DOCS] Add cluster get settings API example (#65754) (#65757) 2020-12-02 10:55:16 -05:00
James Rodewig
ba54e49eae
[DOCS] Remove erroneous flat_settings query param (#65670) (#65746)
Co-authored-by: Thiago Souza <thiago@elastic.co>
2020-12-02 09:42:52 -05:00
Wylie Conlon
4d9f5b1867 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:56:02 -08:00
James Rodewig
aea83909d9
[DOCS] Fix case for 'Boolean' (#64299) (#64341) 2020-10-29 10:04:20 -04:00
Adam Locke
1fa232eb2a
[DOCS] [7.x] Combining important config settings into a single page (#63849) (#63884)
* [DOCS] Combining important config settings into a single page (#63849)

* Combining important config settings into a single page.

* Updating ids for two pages causing link errors and implementing redirects.

* Updating links to use IDs instead of xrefs.
2020-10-19 12:59:31 -04:00
Lee Hinman
4a08928c47
[7.x] Add index.routing.allocation.include._tier_preference setting (#62589) (#62667)
This commit adds the `index.routing.allocation.prefer._tier` setting to the
`DataTierAllocationDecider`. This special-purpose allocation setting lets a user specify a
preference-based list of tiers for an index to be assigned to. For example, if the setting were set
to:

```
"index.routing.allocation.prefer._tier": "data_hot,data_warm,data_content"
```

If the cluster contains any nodes with the `data_hot` role, the decider will only allow them to be
allocated on the `data_hot` node(s). If there are no `data_hot` nodes, but there are `data_warm` and
`data_content` nodes, then the index will be allowed to be allocated on `data_warm` nodes.

This allows us to specify an index's preference for tier(s) without causing the index to be
unassigned if no nodes of a preferred tier are available.

Subsequent work will change the ILM migration to make additional use of this setting.

Relates to #60848
2020-09-18 15:41:36 -06:00
James Rodewig
e65778c222
[DOCS] Fix typo in nodes stats docs (#61601) (#61717)
Co-authored-by: Henry <henryloh@ucla.edu>
2020-08-31 09:29:50 -04:00
Lee Hinman
1bfebd54ea
[7.x] Allocate newly created indices on data_hot tier nodes (#61342) (#61650)
This commit adds the functionality to allocate newly created indices on nodes in the "hot" tier by
default when they are created.

This does not break existing behavior, as nodes with the `data` role are considered to be part of
the hot tier. Users that separate their deployments by using the `data_hot` (and `data_warm`,
`data_cold`, `data_frozen`) roles will have their data allocated on the hot tier nodes now by
default.

This change is a little more complicated than changing the default value for
`index.routing.allocation.include._tier` from null to "data_hot". Instead, this adds the ability to
have a plugin inject a setting into the builder for a newly created index. This has the benefit of
allowing this setting to be visible as part of the settings when retrieving the index, for example:

```
// Create an index
PUT /eggplant

// Get an index
GET /eggplant?flat_settings
```

Returns the default settings now of:

```json
{
  "eggplant" : {
    "aliases" : { },
    "mappings" : { },
    "settings" : {
      "index.creation_date" : "1597855465598",
      "index.number_of_replicas" : "1",
      "index.number_of_shards" : "1",
      "index.provided_name" : "eggplant",
      "index.routing.allocation.include._tier" : "data_hot",
      "index.uuid" : "6ySG78s9RWGystRipoBFCA",
      "index.version.created" : "8000099"
    }
  }
}
```

After the initial setting of this setting, it can be treated like any other index level setting.

This new setting is *not* set on a new index if any of the following is true:

- The index is created with an `index.routing.allocation.include.<anything>` setting
- The index is created with an `index.routing.allocation.exclude.<anything>` setting
- The index is created with an `index.routing.allocation.require.<anything>` setting
- The index is created with a null `index.routing.allocation.include._tier` value
- The index was created from an existing source metadata (shrink, clone, split, etc)

Relates to #60848
2020-08-27 13:41:12 -06:00
James Rodewig
60876a0e32
[DOCS] Replace Wikipedia links with attribute (#61171) (#61209) 2020-08-17 11:27:04 -04:00
James Rodewig
26d51089da
[DOCS] Replace twitter dataset in docs (#60604) (#60609) 2020-08-03 13:31:19 -04:00