Commit graph

413 commits

Author SHA1 Message Date
Luigi Dell'Aquila
d53a324ee5
[8.18] ES|QL: make telemetry more strict (#126940) (#126980)
* ES|QL: make telemetry more strict (#126940)

* Fix compile

* Fix tests

* Fix test
2025-04-17 21:40:19 +10:00
Luke Whiting
627f8c91b8
Update missed documentation change for new watcher index settings (#125758) (#125925)
* Update missed documentation change for new watcher index settings

* Update docs/reference/rest-api/watcher/update-settings.asciidoc



---------

Co-authored-by: Keith Massey <keith.massey@elastic.co>
2025-03-31 20:55:33 +11:00
Pat Whelan
3191c86267
[Transform] add support for extended_stats (#120340) (#121184)
Building off of `stats` and multi-value aggregations, including the
limitation:
- all values of extended_stats will be mapped to `double` if mapping
  deduction is used

Relates #51925
2025-01-30 03:44:11 +11:00
Panagiotis Bailis
182cba3935
[8.x] Backporting adding linear retriever to support weighted sums of sub-retrievers (#121076) 2025-01-29 11:05:36 +02:00
Slobodan Adamović
442fc1f3b6
[Docs] Update Query Roles API documentation (#120740) (#121058)
The query role API now returns built-in roles as well.
This PR notes this and adds an example on how the 
built-in roles can be filtered out.
2025-01-29 02:56:52 +11:00
Marci W
670faa8a73
[DOCS] Count API: clarify ways to specify search query (#120564) (#120683)
* Clarify query methods; other sprucing

* Apply suggestions from review
2025-01-23 10:32:20 +11:00
Carlos Delgado
9362cafcf3
[Docs] kNN vector rescoring for quantized vectors (#118425) (#120407) 2025-01-18 03:30:11 +11:00
Orestis Floros
b38748edc7
Permissions required for stateful agentless integrations (#118644) (#119973)
Closes elastic/security-team#11102
Closes elastic/security-team#11104

This allows agentless integrations (via elastic/beats#41446, elastic/kibana#203810) to write to agentless-* indices. Each index is created on-demand by the filebeat client and kibana conditionally extends the API key permissions to allow writing to the index.

(cherry picked from commit 3c184b912c)

# Conflicts:
#	docs/reference/rest-api/security/get-service-accounts.asciidoc
#	x-pack/plugin/security/qa/service-account/src/javaRestTest/java/org/elasticsearch/xpack/security/authc/service/ServiceAccountIT.java
#	x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/authc/service/ElasticServiceAccounts.java
2025-01-13 17:44:49 +00:00
Lisa Cawley
b499ff745a
[DOCS] More links to new API site (#119380) (#119420) 2025-01-01 07:29:25 +11:00
Lisa Cawley
86d568ff26
[DOCS] More links to new API site (#119377) (#119417)
(cherry picked from commit ba8beecdb0)
2024-12-31 20:19:47 +00:00
Lisa Cawley
f2e457ccdb
[DOCS] Link to new API site (#119038) (#119361)
Co-authored-by: shainaraskas <58563081+shainaraskas@users.noreply.github.com>
2024-12-31 04:18:27 +11:00
Niels Bauman
364c80e128
Fix usage API docs test (#119192) (#119217)
This ensures the usage API docs tests are passing again. We achieve this
by: 1. ignoring the contents of `inference.models` because the models
might not yet have been initialized and 2. adding missing fields to the
`logsdb` usage.
2024-12-24 03:22:17 +11:00
Jake Landis
84f4f3ac2b
Docs for monitor_stats privilege (#116533) (#116671)
This commit adds docs for monitor_stats and updates an example snippet to include both remote_indices and remote_cluster.

(cherry picked from commit b7167b73e3)
2024-11-13 02:45:38 +11:00
Johannes Fredén
803de168b8
[DOCS] Remove tech preview from bulk create/update/delete roles (#116601) (#116639)
Mark bulk create/update/delete roles GA in 9.0 and 8.17

(cherry picked from commit bfb30d2e72)
2024-11-12 19:09:40 +11:00
Jake Landis
8adb2c4043
[8.x] Add a monitor_stats privilege and allow that privilege for remote cluster privileges (#114964) (#116517)
* Add a monitor_stats privilege and allow that privilege for remote cluster privileges (#114964)

This commit does the following:
   * Add a new monitor_stats privilege
   * Ensure that monitor_stats can be set in the remote_cluster privileges
   * Give's Kibana the ability to remotely call monitor_stats via RCS 2.0

Since this is the first case where there is more than 1 remote_cluster privilege,
the following framework concern has been added:
    * Ensure that when sending to elder RCS 2.0 clusters that we don't send the new privilege
        previous only supported all or nothing remote_cluster blocks
    * Ensure that we when sending API key role descriptors that contains remote_cluster,
       we don't send the new privileges for RCS 1.0/2.0 if it not new enough
    * Fix and extend the BWC tests for RCS 1.0 and RCS 2.0

(cherry picked from commit af99654dac)

* adjust bwc for 8.x branch
2024-11-09 06:26:14 +11:00
Jake Landis
6b98d77d57
Fix missing remote_cluster docs (#116366) (#116440)
Documentation for the remote_cluster in the role was added
in #111682 and #108840, but a few places were missed.
This commit fill the gaps in the documentation.
2024-11-08 07:10:47 +11:00
Nhat Nguyen
f63cf672fd
Add logsdb telemetry (#115994) (#116101)
This PR adds telemetry for logsdb. However, this change only tracks the 
count of indices using logsdb and those that use synthetic source. 
Additional stats, such as shard, indexing, and search stats, will be
added in a follow-up, as they require reaching out to data nodes.
2024-11-02 03:32:12 +11:00
Luigi Dell'Aquila
b0b9968490
ES|QL: add metrics for functions (#114620) (#115191) 2024-10-21 14:06:56 +02:00
David Kyle
ffcf87ce1d
[ML] Default inference endpoint for the multilingual-e5-small model (#114683) (#114779) 2024-10-15 11:14:49 +11:00
Nik Everett
67ce8bd244
ESQL: Entirely remove META FUNCTIONS (#113967) (#114342)
This removes the undocumented `META FUNCTIONS` command that emits
descriptions for all functions. This shouldn't be used because we never
told anyone about it. I'd have preferred if we'd have explicitly
documented it as no public or if we'd have left it snapshot-only. But
sometimes you make a mistake. I'm hopeful no one is relying on it. It
was never reliable and not public.....
2024-10-10 07:51:18 +11:00
David Turner
3e4957da52
Document that ?wait_for_active_shards=0 is permitted (#114091) (#114273)
Today the docs for the `?wait_for_active_shards` parameter say that it
must be a positive integer, proscribing `0`, yet `0` is a legitimate
value for this parameter. This commit fixes this point and rewords the
docs slightly for clarity.
2024-10-08 17:24:15 +11:00
Mike Pellegrini
5b8f9c12d2
[ML] Default inference endpoint for ELSER (#114164)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-10-08 06:58:10 +11:00
David Kyle
cc3caa228d
[ML] Add deployment threading details and memory usage to telemetry (#113099) (#113516)
Adds deployment threading options and a new memory section reporting
the memory usage for each of the ml features
# Conflicts:
#	server/src/main/java/org/elasticsearch/TransportVersions.java
2024-09-25 22:35:09 +10:00
Mary Gouseti
c1a2d390ef
Update data stream lifecycle telemetry to track global retention (#112451)
Currently, the data stream lifecycle telemetry has the following
structure:

```
{
....
  "data_lifecycle" : {
    "available": true,
    "enabled": true,
    "count": 0,
    "default_rollover_used": true,
    "retention": {
        "minimum_millis": 0,
        "maximum_millis": 0,
        "average_millis": 0.0
    }
  }....
```

In the snippet above you can see that we track:

- The amount of data streams managed by the data stream lifecycle by `count`
- If the default rollover has been overwritten by `default_rollover_used`
- The min, max and average of the `data_retention` configured on a data stream level.

In this PR we propose the following extention:

```
....
  "data_lifecycle" : {
    "available": true,
    "enabled": true,
    "count": 0,
    "default_rollover_used": true,
    "effective_retention": { #https://github.com/elastic/dev/issues/2537
        "retained_data_streams": 5,
        "minimum_millis": 0, # Only if retained data streams > 1
        "maximum_millis": 0,
        "average_millis": 0.0
    },
    "data_retention": {
        "configured_data_streams": 5,
        "minimum_millis": 0, # Only if retained data streams > 1
        "maximum_millis": 0,
        "average_millis": 0.0
    },
    "global_retention": {
      "default": {
         "defined": true/false,
	  "affected_data_streams": 0,
         "millis": 0 
      },
      "max": {
         "defined": true/false,
	  "affected_data_streams": 0,
         "millis": 0 
      }
    }
```

With this extension we are tracking:

- The amount of data streams managed by the data stream lifecycle by `count`
- If the default rollover has been overwritten by `default_rollover_used`
- The min, max and average of the `data_retention` configured on a data stream level and the number of data streams that have it configured. We add the min, max and avg only if there are data streams with data retention configuration to avoid messing with the stats in a dashboard.
- The min, max and average of the `effective_retention` and the number of data streams that are retained. We add the min, max and avg only if there are retained data streams to avoid messing with the stats in a dashboard.
- Global retention stats, if they are defined, if the number of the affected data streams and the actual value.

The above metrics allow us to answer questions like:

- How many data streams are affected by global retention.
- How big is the difference between the longest data retention compared to max global retention.
- How much does the effective retention diverging from the data retention, this will show the impact of the global retention.
2024-09-11 18:31:04 +10:00
Panagiotis Bailis
7563a724f0
Updating retriever documentation to better explain how filters are applied (#112201) 2024-08-26 16:15:31 +03:00
Larisa Motova
9ac0718d90
Add docs for shard level stats in node stats (#111082)
Fixes #111081
2024-08-13 14:59:03 +03:00
Mary Gouseti
9185056efe
Clean up global retention from the cluster state and obsolete transport actions (#111636)
In this PR we remove unused code including relating to the global data retention with APIs implementation:

- The transport action for updating, deleting and retrieving the global retention.
- The `DataStreamGlobalRetention` from the cluster state (this should be bwc safe because we never exposed the APIs to add a data stream lifecycle to the cluster state).
- Make unused privileges monitor and managing global retention a noop.
- Remove cluster state update tasks.

The kept `DataStreamGlobalRetentionResolver` considering it could hold and provide the global retention from the settings when we implement it. We just renamed it to DataStreamGlobalRetentionProvider for now to better match what it does.

The factory retention settings should still work after this change.
2024-08-08 09:52:35 +03:00
Albert Zaharovits
747fa59a2c
DOCS Query Roles (#110473)
These are the docs changes in relation to
https://github.com/elastic/elasticsearch/pull/108733
2024-07-05 19:46:48 +10:00
George Wallace
b6e9860919
Update role-mapping-resources.asciidoc (#110441)
made it clear that some characters need to be escaped properly

Co-authored-by: Jan Doberstein <jan.doberstein@elastic.co>
2024-07-03 13:00:52 -06:00
Johannes Fredén
89cd966b24
Add bulk delete roles API (#110383)
* Add bulk delete roles API
2024-07-03 11:04:53 +02:00
Johannes Fredén
55476041d9
Add BulkPutRoles API (#109339)
* Add BulkPutRoles API
2024-07-02 15:45:39 +02:00
Jedr Blaszyk
3b827f6a8c
Create manage_connector privilege (#110128)
* Create manage_seaech_connector privilege

* `manage_search_connector` -> `manage_connector` and exclude connector secrets patterns from this privilege

* Add `monitor_connector` privilege

* Update Kibana system privilege to monitor_connector for telemetry

* Rename privilege to 'manage_connector_state'

Since privilege names are often namespaced and used with globs, we want to ensure that if there's a future privilege like `manage_connector_secrets`, that it is not implicitly included in this new privileg's <name>*. By extending the privilege name to include "_state", we better namespace this distinct from any "_secrets" namespace.

* Revert "Rename privilege to 'manage_connector_state'"

This reverts commit 70b89eee76.
After further discussion with the security team, this name change is not needed after all
since the secret management privileges aren't currently prefixed with "manage_"

---------

Co-authored-by: Sean Story <sean.j.story@gmail.com>
2024-07-01 12:41:28 -05:00
Nikolaj Volgushev
78c812f845
Fix security index settings docs (#110126)
Docs tweak with a typo fix and a clarification on how the two available
settings interact (essentially
https://github.com/elastic/elasticsearch/issues/27871). I'm also open to
including this info in the more generic settings API but feels like a
simple enough callout to add to the security API.
2024-07-01 18:07:15 +10:00
Mayya Sharipova
405e39660b
Support k parameter for knn query (#110233)
Introduce an optional k param for knn query

If k is not set, knn query has the previous behaviour:
- `num_candidates` docs  is collected from each shard. This `num_candidates` docs
are used for combining with results with other queries and aggregations on each shard.
- docs from all shards are merged to produce the top global `size` results

If k is set, the behaviour instead is following:
- `k` docs is collected from each shard. This `k` docs are used for
combining results with other queries and aggregations on each shard.
- similarly, docs from all shards are merged to produce the top global `size`
results.

Having `k` param makes it more intuitive for users to address their needs.
They also don't need to care and can skip `num_candidates` param for this query
as it is of more internal details to tune how knn search operates.

Closes #108473
2024-06-28 09:59:28 -04:00
Jim Ferenczi
a6470fb86d
Fix cluster level dense vector stats (#107962)
The cluster level dense vector stats returns the total number of dense vector indices globally including the replicas.
This commit fixes the total to only include the value count of the primary indices.
This change aligns with the docs stats which also reports the number of primary documents when used in cluster stats.
The indices stats API still reports granular results for replicas and primaries so the information is not lost.
2024-06-18 17:45:02 +01:00
Kathleen DeRusso
8529bf71f6
Add SparseVectorStats (#108793)
* Add SparseVectorStats

* Update to use mappings in engine

* Update to be unique to primary shards

* Fix doc

* Fix null error in test

* Cleanup

* fix yaml

* remove comment

* add version to yaml

* Revert whitespace changes to stats doc

* fix yml test

* Checkstyle

* Fix NPE in test

* Update docs/changelog/108793.yaml

* Add link to sparse_vector field type in docs

* PR feedback

* Flesh out test a bit more

* PR feedback - alphabetize placement in docs

* Fix doc change
2024-06-17 11:42:14 -04:00
Albert Zaharovits
0e4888bdec
Refactor field name translator of query endpoints for security entities (#109559)
This is a refactoring of the internal logic that's used to translate
query-level into index-level field names for query APIs for
security entities (i.e. users, API Keys, and soon, roles).
The objective here is to have and reuse a single class to handle
all the translations for different security query APIs.
2024-06-13 14:12:19 +03:00
Jake Landis
7504fed0b3
remote_cluster role documentation and expose to built in privs API (#108840)
This commit introduces the documentation for remote_clusters which is used to help
 express the monitor_enrich privilege needed to use the ENRICH keyword across clusters 
when using the API key based CCS security model.

This commit also adds "remote_clusters" to the built in privs API to for easier consumption
 in Kibana.
2024-05-28 13:51:21 -05:00
Mary Gouseti
af45653e00
Expose basic x-pack telemetry for failure store (#108899) 2024-05-23 16:45:11 +03:00
Jake Landis
ff92296217
[docs] Prevent DLS/FLS if replication is assigned (#108839)
This commit adds documentation for the DLS/FLS restriction for RCS 2.0 API keys 
where both access and replication are defined and access has DSL/FLS.
This commit also fixes a few misleading variable names.
related: #108600
2024-05-22 12:05:34 -05:00
Nick Tindall
3ecdd77e97
[DOCS] Align docs to implementation for timeout parameters (#108593)
* [DOCS] Fix documentation for timeout-related parameters

Closes #108224
2024-05-16 13:05:39 +10:00
Slobodan Adamović
77ce60530c
[docs] Document new role description field (#108422)
This commit updates Role API docs to include new description field 
(introduced in #107088) and adds descriptions for all built-in roles.
2024-05-14 10:16:55 +02:00
Nick Tindall
68a8664c21
[DOCS] Fix stored_fields parameter description (#98385) (#108445)
(referenced from get and multi_get API docs)

Closes #98385
2024-05-09 03:17:10 -04:00
Martijn van Groningen
e043bce1af
Add more rollup usage stats (#108245)
This change adds `number_of_rollup_jobs` and `number_of_rollup_indices`
to  `rollup` usage. The former indicates the number of active rollup
jobs running and the latter indicated the number of rollup indices
(which could be the result of previous rollup jobs).
2024-05-07 13:02:54 -04:00
Nikolaj Volgushev
31afff92f8
Invalidate cross cluster API key docs (#108297)
This PR documents privilege requirements for cross-cluster API key
invalidation, which were updated in
https://github.com/elastic/elasticsearch/pull/107411.
2024-05-06 10:02:14 -04:00
Liam Thompson
9a62dba53c
[DOCS] Remove remaining beta flags for RCS (#108201) 2024-05-03 09:12:37 +02:00
florent-leborgne
0c500e5264
Remove Beta label for RCS2.0 from 8.14 (#108030) 2024-05-02 15:43:21 +02:00
David Turner
fc287bde8b
Interpret ?timeout=-1 as infinite ack timeout (#107675)
APIs which perform cluster state updates typically accept the
`?master_timeout=` and `?timeout=` parameters to respectively set the
pending task queue timeout and the acking timeout for the cluster state
update. Both of these parameters accept the value `-1`, but
`?master_timeout=-1` means to wait indefinitely whereas `?timeout=-1`
means the same thing as `?timeout=0`, namely that acking times out
immediately on commit.

There are some situations where it makes sense to wait for as long as
possible for nodes to ack a cluster state update. In practice this wait
is bounded by other mechanisms (e.g. the lag detector will remove the
node from the cluster after a couple of minutes of failing to apply
cluster state updates) but these are not really the concern of clients.

Therefore with this commit we change the meaning of `?timeout=-1` to
mean that the acking timeout is infinite.
2024-04-30 09:54:15 -04:00
Liam Thompson
33a71e3289
[DOCS] Refactor book-scoped variables in docs/reference/index.asciidoc (#107413)
* Remove `es-test-dir` book-scoped variable

* Remove `plugins-examples-dir` book-scoped variable

* Remove `:dependencies-dir:` and `:xes-repo-dir:` book-scoped variables

- In `index.asciidoc`, two variables (`:dependencies-dir:` and `:xes-repo-dir:`) were removed.
- In `sql/index.asciidoc`, the `:sql-tests:` path was updated to fuller path
- In `esql/index.asciidoc`, the `:esql-tests:` path was updated idem

* Replace `es-repo-dir` with `es-ref-dir`

* Move `:include-xpack: true` to few files that use it, remove from index.asciidoc
2024-04-17 14:37:07 +02:00
David Turner
ccbb5badce
Fix support for infinite ?master_timeout (#107050)
Specifying `?master_timeout=-1` on an API which performs a cluster state
update means that the cluster state update task will never time out
while waiting in the pending tasks queue. However this parameter is also
re-used in a few places where a timeout of `-1` means something else,
typically to timeout immediately. This commit fixes those places so that
`?master_timeout=-1` consistently means to wait forever.
2024-04-10 18:32:38 +01:00