Commit graph

62 commits

Author SHA1 Message Date
Pete Gillin
b8bf111830
Remove telemetry related to frozen indices (#119890)
This deprecated feature is being removed in 9.0, so the telemetry is
no longer needed.

The usage action is retained to support mixed v8/v9 clusters, with
annotations to remove in V10. But it is no longer registered in
`XPackUsageFeatureAction.ALL` and so the usage data is no longer
reported by `GET _xpack/usage`, and if invoked it always returns a
count of 0.

ES-9736 # comment Removed the telemetry in https://github.com/elastic/elasticsearch/pull/119890
2025-01-22 11:19:15 +00:00
Lisa Cawley
8a821f0a96
[DOCS] More links to new API site (#119380) 2024-12-31 12:02:59 -08:00
Niels Bauman
dac3bfd52e
Fix usage API docs test (#119192)
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-23 16:03:47 +01:00
Nhat Nguyen
6d4e11d6bc
Add logsdb telemetry (#115994)
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-01 08:25:40 -07:00
Luigi Dell'Aquila
7d4f75ab80
ES|QL: add metrics for functions (#114620) 2024-10-21 09:36:14 +02:00
David Kyle
5efba5b43d
[ML] Default inference endpoint for the multilingual-e5-small model (#114683) 2024-10-15 01:05:40 +02:00
Nik Everett
d3fa42cda0
ESQL: Entirely remove META FUNCTIONS (#113967)
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-08 18:37:55 +02:00
David Kyle
4d5906422b
[ML] Default inference endpoint for ELSER (#113873)
Adds a default configuration for the ELSER model. The config uses
adaptive allocations to automatically scale. Min number of allocations
is set to 1 for this PR, a follow up with change that to 0 and enable
scale from 0.

This end point is always visible in the GET API.

```
GET _inference

{
  "endpoints": [
    {
      "inference_id": ".elser-2",
      "task_type": "sparse_embedding",
      "service": "elser",
      "service_settings": {
        "num_threads": 1,
        "model_id": ".elser_model_2",
        "adaptive_allocations": {
          "enabled": true,
          "min_number_of_allocations": 1,
          "max_number_of_allocations": 8
        }
      },
      "task_settings": {}
    }
  ]
}
```

The default configuration can be used against without any prior setup.
If the model is not downloaded it is automatically downloaded. If it is
not deployed it is deployed

```
POST _inference/.elser-2
{
  "input": "Automagically deploy and infer" 
}
 ... 

{
  "sparse_embedding": [
    {
      "is_truncated": false,
      "embedding": {
        "##fer": 2.2107008,
        "deployment": 2.1624098,
        "deploy": 2.144009,
        "auto": 1.9384763,
```

### Follow up tasks - [ ] Add default config for the E5 text embedding
model - [ ] Select platform specific version - [ ] Scale from 0 - [ ]
Chunking settings - What happens when the end point is deleted, can it
be deleted? - Can the default config be modified - chunking settings for
example? Probably not
2024-10-04 19:27:10 +10:00
David Kyle
884196ced3
[ML] Add deployment threading details and memory usage to telemetry (#113099)
Adds deployment threading options and a new memory section reporting 
the memory usage for each of the ml features
2024-09-23 16:08:46 +01: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
Mary Gouseti
af45653e00
Expose basic x-pack telemetry for failure store (#108899) 2024-05-23 16:45:11 +03: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
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
Bogdan Pintea
1fbb085bd0
ESQL: Rename SHOW FUNCTIONS to META FUNCTIONS (#106362)
This renames the `show functions` command to `meta functions`.
It also removes its documentation and usage tracking.
2024-03-19 13:02:34 +01:00
Andrei Stefan
6bba0efa78
ESQL: New telemetry for commands (#102937)
* Add enrich,mv_expand,show,row,from,drop,keep,rename commands to telemetry
2023-12-06 02:24:00 +02:00
Jan Kuipers
a67d5b8986
Inference telemetry (#102877)
* Empty infenrece usage wiring.

* Add fake data

* Fix NPE for secretSettings == null

* Real inference model stats

* New transport version

* Code polish

* Lint fixes

* Update docs/changelog/102877.yaml

* Update 102877.yaml

* Add inference to yamlRestTest

* Declare inference usage action as non-operator

* TransportInferenceUsageActionTests

* Lint fixes

* Replace map by ToXContentObject/Writeable

* Polish code

* AbstractWireSerializingTestCase<InferenceFeatureSetUsage.ModelStats>

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2023-12-04 14:27:54 +01:00
Jan Kuipers
2e95b992b2
Add stats by model to the machine learning usage stats. (#101915)
* Add inference counts by NLP model to the machine learning usage stats.

* Update docs/changelog/101915.yaml

* Add inference_counts_by_model to yamlRestTest.

* Strip leading dot from internal model IDs.

* Add last access and task type to the stats by model.

* Change stats_by_model for map to list

* Simplify code.

* Fix style
2023-11-13 08:50:15 +01:00
Daniel Mitterdorfer
dfaec0dbf0
Enable Universal Profiling as Enterprise feature (#100333)
With this commit we ensure that Universal Profiling can only be used
with an Enterprise license.
2023-10-09 07:58:04 +02:00
James Rodewig
daddca75d1
[DOCS] Fix Usage API snippet test (#99497) 2023-09-12 15:53:55 -04:00
James Rodewig
255c9a7f95
[DOCS] Move x-pack docs to docs/reference dir (#99209)
**Problem:**
For historical reasons, source files for the Elasticsearch Guide's security, watcher, and Logstash API docs are housed in the `x-pack/docs` directory. This can confuse new contributors who expect Elasticsearch Guide docs to be located in `docs/reference`. 

**Solution:**
- Move the security, watcher, and Logstash API doc source files to the `docs/reference` directory
- Update doc snippet tests to use security

Rel: https://github.com/elastic/platform-docs-team/issues/208
2023-09-12 14:53:41 -04:00
ChrisHegarty
2e4440ff1c Remove space in dissect feature list 2023-08-14 14:54:37 +01:00
ChrisHegarty
7cb310b9d0 Merge upstream 2023-08-14 09:55:02 +01:00
Yang Wang
d0f64941f0
Remove RCS 2.0 feature flag for beta release (#98307)
This PR removes the RCS 2.0 feature flag so that it is ready for beta
release.
2023-08-14 08:33:37 +10:00
elasticsearchmachine
9d1e4bcc2a Merge pull request ESQL-1546 from elastic/main
🤖 ESQL: Merge upstream
2023-08-07 13:27:50 -04:00
Kathleen DeRusso
4367c3f31c
Add query rulesets counts to enterprise search telemetry (#98071) 2023-08-07 10:38:12 -04:00
elasticsearchmachine
2834c015cb Merge pull request ESQL-1219 from elastic/main
🤖 ESQL: Merge upstream
2023-06-01 13:16:52 -04:00
Mary Gouseti
8bcdaa9d62
Test fix: Update to the latest form the data_lifecycle telemetry section (#96484) 2023-06-01 15:33:26 +03:00
elasticsearchmachine
06004e2e9d Merge pull request ESQL-1207 from elastic/main
🤖 ESQL: Merge upstream
2023-05-30 13:18:56 -04:00
Keith Massey
17ff9f0fb1
Adding data_lifecycle to the _xpack/usage API (#96177)
This adds a `data_lifecycle` section to the _xpack/usage API, giving basic information about data lifecycles in the cluster. The data looks something like:
```
    "data_lifecycle": {
        "available": true,
        "enabled": true,
        "lifecycle": {
            "count": 1,
            "default_rollover_used": true,
            "retention": {
                "minimum_millis": 360000,
                "maximum_millis": 360000,
                "average_millis": 360000.0
            }
        }
    }
```
2023-05-30 13:48:03 +03:00
elasticsearchmachine
0ebbf0f60e Merge pull request ESQL-1188 from elastic/main
🤖 ESQL: Merge upstream
2023-05-26 13:18:02 -04:00
Sloane Perrault
9649ee0536
add analytics_collections to ent search usage test (#96385) 2023-05-26 12:10:54 -04:00
Andrei Stefan
9d4571a39e Docs fix 2023-05-25 02:17:02 +03:00
Jim Ferenczi
154176b607
Fix _xpack/usage for enterprise_search in docs tests (#95845)
The previous fix (#95565) didn't work since the section was misplaced.
Note that this test runs only on snapshot build so I tested manually and the failure is now related to remote_clusters section missing.

Closes #95603
2023-05-05 10:11:13 +01:00
Albert Zaharovits
b90060538a
Fix _xpack_usage for enterprise_search (#95565)
Fixes #95564
2023-04-26 19:23:36 +03:00
Mary Gouseti
2192a982ac
Expose Health Api telemetry via xpack (#91708)
Every node (post `8.7`) collects stats from every health-api request it receives. We extend the `_xpack/usage` endpoint to expose these stats. When a node receives the request it will fan out to collect data from all other nodes, merge them and expose them. If the cluster is not fully upgraded, it will signal it with the `available` flag set to`false`.
2023-01-04 14:34:29 +01:00
Yannick Welsch
74b5bfdb73
Feature usage actions for archive (#83931)
Relates #81210
2022-02-16 08:31:41 +01:00
Benjamin Trent
5627dc66e1
[ML] deprecate estimated_heap_memory_usage_bytes and replace with model_size_bytes (#80554)
This deprecates estimated_heap_memory_usage_bytes on model put and replaces it with model_size_bytes.

On GET, only model_size_bytes is returned unless v7 rest-api compatibility is requested.

For the ml/info API, only model_size_bytes is returned

A forward-port of: #80545
2021-11-10 10:23:25 -05:00
James Rodewig
f56a0f4b66
[DOCS] Remove testenv annotations from doc snippet tests (#80023)
Removes `testenv` annotations and related code. These annotations originally let you skip x-pack snippet tests in the docs. However, that's no longer possible.

Relates to #79309, #31619
2021-11-05 18:38:50 -04:00
Benjamin Trent
4557d5f797
[ML] adding new model types and deployments to xpack usage (#80282)
This adds new model types + deployment information to xpack/usage under ml.inference

closes: #80200
2021-11-04 11:26:37 -04:00
Mayya Sharipova
23781bb555
Remove xpack actions for vector field (#75017)
We have already decided not to have xpack usage for field mappers
(see #53076). As mappings stats of all fields is already tracked
in cluster stats.
Moreover xpack usage for vector field is a quite expensive operation
(see #74974).

This removes xpack actions for vector field.
2021-07-13 09:52:50 -04:00
Lyudmila Fokina
3b0b7941ae
Warn users if security is implicitly disabled (#70114)
* Warn users if security is implicitly disabled

Elasticsearch has security features implicitly disabled by default for
Basic and Trial licenses, unless explicitly set in the configuration
file.
This may be good for onboarding, but it also lead to unintended insecure
 clusters.
 This change introduces clear warnings when security features are
 implicitly disabled.
 - a warning header in each REST response if security is implicitly
 disabled;
 - a log message during cluster boot.
2021-04-13 18:33:41 +02:00
Yannick Welsch
9910c7a359
Extend searchable snapshots feature usage stats (#70441)
Extends the feature usage stats, distinguishing between full_copy and shared_cache style searchable snapshot indices.
2021-03-16 18:02:34 +01: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
Dimitris Athanasiou
bbf81a2603
[ML] Expand usage stats for data frame analytics and trained models (#69477)
This adds additional statistics into the usage API for data frame analytics
and trained models.

For data frame analytics the added stats are:

  - count of jobs by analysis type
  - stats for peak_usage_bytes

For trained models the added stats are:
  - counts of: total, prepackaged, other (not created by data frame analytics)
  - counts by analysis type based on the inference config
  - stats for estimated heap usage
  - stats for estimated number of operations
2021-02-24 15:45:26 +02:00
Adam Locke
a39eef6309
[DOCS] Fixing Painless tests (#68157)
* Fixing Painless tests.

* Update runtime field context to fix test cases.

* Remove watcher logging from usage API and replace test.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2021-02-09 11:24:14 -05:00
Lee Hinman
3f9f007545
Add the frozen tier node role and ILM phase (#68605)
This commit adds the `data_frozen` node role as part of the formalization of data tiers. It also
adds the `"frozen"` phase to ILM, currently allowing the same actions as the existing cold phase.

The frozen phase is intended to be used for data even less frequently searched than the cold phase,
and will eventually be loosely tied to data using partial searchable snapshots (as oppposed to full
searchable snapshots in the cold phase).

Relates to #60848
2021-02-05 14:38:13 -07:00
Igor Motov
9e3384ebc9
Add multi_terms aggs (#67597)
Adds a multi_terms aggregation support. The multi terms aggregation works
very similarly to the terms aggregation but supports multiple terms. The goal
of this PR is to add the basic functionality so it is not optimized at the
moment. It will be done in follow up PRs.

Closes #65623
2021-02-03 13:13:33 -05:00
Christoph Büscher
b85d52adbd Skip reference/rest-api/usage/line_39 docs test 2021-01-28 13:00:26 +01:00
Adam Locke
c91a808732
[DOCS] Update Painless examples to use seat data (#68029)
* Adds datetime as a date, which is necessary in setup.

* Updating field context example.

* Fixing sample data, updating context example, and updating runtime example.

* Updating field context and changing runtime field to use seats data.

* Update filter context to use the seats data.

* Updating min-should-match context to use seats data.

* Replacing last mentions of TEST[skip].

* Update usage with watcher response for build error.

* Updating usage API again for watcher.

* Third time's a charm for fixing test cases.

* Adding specific test replacement for watcher logging total.

* Change actors to keyword based on review feedback.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2021-01-27 16:42:22 -05:00
James Rodewig
03334b9801
[DOCS] Add security privileges to API docs (#67939) 2021-01-27 09:06:06 -05:00