Commit graph

27 commits

Author SHA1 Message Date
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
Luca Cavanna
20d6fbcd55
Add xpack info and usage endpoints for runtime fields (#65600)
Relates to #59332
2020-12-08 10:15:08 +01:00
Christos Soulios
66b5e4ec89
Implement aggregations on aggregate metric fields (#56745)
In the process of developing a new implementation for the Elasticsearch Rollups functionality we came up with the concept of the aggregate metric field type.

The aggregate_metric_double field type can store the results of aggregations (currently min, max, sum, value_count and avg are supported - more to come).

This field allows us to run (min, max, sum, value_count, avg) aggregations on the container field and the field will return the correct metric depending on the aggregation that is computed.
2020-11-10 19:31:59 +02:00
Lee Hinman
5fca68a155
Add telemetry for data tiers (#63031)
This commit adds telemetry for our data tier formalization. This telemetry helps determine the
topology of the cluster with regard to the content, hot, warm, & cold tiers/roles.

An example of the telemetry looks like:

```
GET /_xpack/usage?human
{
  ...
  "data_tiers" : {
    "available" : true,
    "enabled" : true,
    "data_warm" : {
      ...
    },
    "data_cold" : {
      ...
    },
    "data_content" : {
      "node_count" : 1,
      "index_count" : 6,
      "total_shard_count" : 6,
      "primary_shard_count" : 6,
      "doc_count" : 71,
      "total_size" : "59.6kb",
      "total_size_bytes" : 61110,
      "primary_size" : "59.6kb",
      "primary_size_bytes" : 61110,
      "primary_shard_size_avg" : "9.9kb",
      "primary_shard_size_avg_bytes" : 10185,
      "primary_shard_size_median" : "8kb",
      "primary_shard_size_median_bytes" : 8254,
      "primary_shard_size_mad" : "7.2kb",
      "primary_shard_size_mad_bytes" : 7391
    },
    "data_hot" : {
       ...
    }
  }
}
```

The fields are as follows:

- node_count :: number of nodes with this tier/role
- index_count :: number of indices on this tier
- total_shard_count :: total number of shards for all nodes in this tier
- primary_shard_count :: number of primary shards for all nodes in this tier
- doc_count :: number of documents for all nodes in this tier
- total_size_bytes :: total number of bytes for all shards for all nodes in this tier
- primary_size_bytes :: number of bytes for all primary shards on all nodes in this tier
- primary_shard_size_avg_bytes :: average shard size for primary shard in this tier
- primary_shard_size_median_bytes :: median shard size for primary shard in this tier
- primary_shard_size_mad_bytes :: [median absolute deviation](https://en.wikipedia.org/wiki/Median_absolute_deviation) of shard size for primary shard in this tier

Relates to #60848
2020-10-01 08:35:10 -06:00
Igor Motov
f107dba741
Add rate aggregation (#61369)
Adds a new rate aggregation that can calculate a document rate for buckets
of a date_histogram.

Closes #60674
2020-08-25 11:32:20 -04:00
Lee Hinman
d543c27223
Add telemetery for data streams (#59433)
This commit adds data stream info to the `/_xpack` and `/_xpack/usage` APIs. Currently the usage is
pretty minimal, returning only the number of data streams and the number of indices currently
abstracted by a data stream:

```
  ...
  "data_streams" : {
    "available" : true,
    "enabled" : true,
    "data_streams" : 3,
    "indices_count" : 17
  }
  ...
```
2020-07-13 12:12:22 -06:00
Yannick Welsch
6e77e70ba2
Add basic searchable snapshots usage information (#58828)
Adds super basic usage information for searchable snapshots, to be extended later.
2020-07-07 10:41:42 +02:00
Lisa Cawley
8b9293b3bf
[DOCS] Replace docdir attribute with es-repo-dir (#57489) 2020-06-01 15:55:05 -07:00
Tal Levy
79367e43da
Add Normalize Pipeline Aggregation (#56399)
This aggregation will perform normalizations of metrics
for a given series of data in the form of bucket values.

The aggregations supports the following normalizations

- rescale 0-1
- rescale 0-100
- percentage of sum
- mean normalization
- z-score normalization
- softmax normalization

To specify which normalization is to be used, it can be specified
in the normalize agg's `normalizer` field.

For example:

```
{
  "normalize": {
    "buckets_path": <>,
    "normalizer": "percent"
  }
}
```

Closes #51005.
2020-05-14 13:32:42 -07:00
Ignacio Vera
4e39184c38
Add moving percentiles pipeline aggregation (#55441)
Similar to what the moving function aggregation does, except merging windows of percentiles 
sketches together instead of cumulatively merging final metrics
2020-05-12 10:30:52 +02:00
Igor Motov
e593f3eaeb
Add analytics plugin usage stats to _xpack/usage (#54911)
Adds analytics plugin usage stats to _xpack/usage. 

Closes #54847
2020-04-13 13:16:12 -04:00
Julie Tibshirani
90b723b8f6
Remove xpack actions for the flattened field. (#53076)
The current consensus is that we don't need info actions for smaller items like
field mappers. We can also remove the usage action since the cluster stats API
now tracks information about mappings, like what field types are defined.
2020-03-04 08:35:03 -08:00
Lisa Cawley
0ff9c6eef1
[DOCS] Adds X-Pack usage API (#52496) 2020-02-20 09:25:57 -08:00