Commit graph

43 commits

Author SHA1 Message Date
Sloane Perrault
b57286aa0f
Add Search Application telemetry to xpack/usage (#95306)
* search application telemetry via xpack.usage

* impl EnterpriseSearchInfoTransportAction, fix test

* fix docs yaml tests and security operator tests

* set enabled & available with settings & license

* test count increases and decreases

* include xpack instead of xpack.usage specifically

* rename enterprise search usage serializing tests

* call action directly

Co-authored-by: Kathleen DeRusso <kathleen.derusso@elastic.co>

* handle `enabled = false` for entsearch usage

* return empty stats on error

* use an OriginSettingClient

---------

Co-authored-by: Kathleen DeRusso <kathleen.derusso@elastic.co>
2023-04-25 09:56:09 -04:00
Yannick Welsch
74b5bfdb73
Feature usage actions for archive (#83931)
Relates #81210
2022-02-16 08:31:41 +01: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
edh-oss
62a471aefe
Update JSON parser and snippets (#77983)
Related to issue  #77823

This does the following:

- Updates several asciidoc files that contained code snippets with
  invalid JSON, most involving unnecessary trailing commas.

- Makes the switch from the Groovy JSON parser to the Jackson parser,
  pursuant to the general goal of eliminating Groovy dependence.

- Makes testing of JSON validity at build time more strict.

Note that this update still allows backslash escaping for any
character. Currently that matters because of the file
"docs/reference/ml/anomaly-detection/apis/get-datafeed-stats.asciidoc",
specifically this part:

    "attributes" : {
      "ml.machine_memory" :
        "$body.datafeeds.0.node.attributes.ml\.machine_memory",
      "ml.max_open_jobs" : "512"
    }

It's not clear to me what change, if any, is appropriate there. So,
I've left in the escaped period and configured the parser to ignore
it for the time being.
2021-09-20 11:08:26 +01: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
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
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
Yang Wang
201b25e92e
Fix xpack info and usage reports for operator privileges (#65867)
This is a follow-up PR for #65256 to fix the xpack info and usage reports for
operator privilegs. In summary, this PR ensures:

* _xpack does not report operator privileges because it is categorised under
security 
* _xpack/usage reports operator privileges status under the security
section 
* _license/feature_usage reports last used time of operator privileges.
It is up to the downstream to filter out this report if necessary.
2020-12-04 18:02:38 +11:00
Yang Wang
def2f2777b
Phase 1 support for operator privileges (#65256)
In some Elastic Stack environments, there is a distinction between the operator
of the cluster infrastructure and the administrator of the cluster. This
distinction cannot be supported currently because the "administrator" often has
the superuser role which grants each and every privilege of the cluster.

This PR adds a new feature to protect a fixed set of APIs from the
"administrator" even when it is a highly privileged user such as superuser. It
enhances the Elasticsearch security model to have an additional layer of
restriction in addition to the RBAC.

Co-authored-by: Tim Vernum <tim@adjective.org>
2020-12-03 16:49:33 +11: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
James Rodewig
1ea83359bb
[DOCS] Fix case for 'Boolean' (#64299) 2020-10-29 09:04:43 -04: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
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
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
Adrien Grand
dbe6769525
Remove constant_keyword from the info API. (#53071)
I discussed with @rjernst about what kind of functionality should be
reported in the info API, since it doesn't sound sensible to list every
single feature there. As a guideline, Ryan suggested that functionality
that needs to maintain state should definitely be in the info API, but
probably not field mappers like `constant_keyword`.
2020-03-04 09:16:37 +01:00
Adrien Grand
0b2a62822c
Introduce a constant_keyword field. (#49713)
This field is a specialization of the `keyword` field for the case when all
documents have the same value. It typically performs more efficiently than
keywords at query time by figuring out whether all or none of the documents
match at rewrite time, like `term` queries on `_index`.

The name is up for discussion. I liked including `keyword` in it, so that we
still have room for a `singleton_numeric` in the future. However I'm unsure
whether to call it `singleton`, `constant` or something else, any opinions?

For this field there is a choice between
 1. accepting values in `_source` when they are equal to the value configured
    in mappings, but rejecting mapping updates
 2. rejecting values in `_source` but then allowing updates to the value that
    is configured in the mapping
This commit implements option 1, so that it is possible to reindex from/to an
index that has the field mapped as a keyword with no changes to the source.
2020-03-02 16:46:46 +01:00
Lisa Cawley
0ff9c6eef1
[DOCS] Adds X-Pack usage API (#52496) 2020-02-20 09:25:57 -08:00
Andrei Stefan
f1d1cceaca
Telemetry data initial implementation (#51715) 2020-02-07 23:00:26 +02:00
Martijn van Groningen
3d2a1bc59f
Include enrich into the info api as feature (#48109)
This commit also fixes a bug, the enrich enabled setting
was not included in the list of settings.
2019-10-16 19:30:27 +02:00
Lee Hinman
f9511f477e
Add SLM support to xpack usage and info APIs (#48096)
* Add SLM support to xpack usage and info APIs

This adds the missing xpack usage and info information into the
`/_xpack` and `/_xpack/usage` APIs. The output now looks like:

```
GET /_xpack/usage
{
  ...
  "slm" : {
    "available" : true,
    "enabled" : true,
    "policy_count" : 1,
    "policy_stats" : {
      "retention_runs" : 0,
      ...
    }
  }
```

and

```
GET /_xpack
{
  ...
  "features" : {
    ...
    "slm" : {
      "available" : true,
      "enabled" : true
    },
    ...
  }
}
```

Relates to #43663

* Fix test expectation

* Fix docs test
2019-10-16 09:00:15 -06:00
Hendrik Muhs
de17140ca0
[Transform] Rename data frame plugin to transform: classes in xpack.core (#46644)
rename classes in xpack.core of transform plugin from "data frame transform" to "transform"
2019-09-15 19:59:21 +02:00
James Rodewig
5c78f606c2
[DOCS] Change // CONSOLE comments to [source,console] (#46440) 2019-09-09 10:45:37 -04:00
James Rodewig
e43be90e6c
[DOCS] [5 of 5] Change // TESTRESPONSE comments to [source,console-results] (#46449) 2019-09-06 14:05:36 -04:00
Zachary Tong
bf71108ab3
Rename data-science plugin to analytics (#46092)
This renames the "data-science" plugin to "analytics".
Also removes the enabled flag
2019-08-29 10:34:17 -04:00
Zachary Tong
273c35f79c
Add Cumulative Cardinality agg (and Data Science plugin) (#43661)
This adds a pipeline aggregation that calculates the cumulative
cardinality of a field.  It does this by iteratively merging in the
HLL sketch from consecutive buckets and emitting the cardinality up
to that point.

This is useful for things like finding the total "new" users that have
visited a website (as opposed to "repeat" visitors).

This is a Basic+ aggregation and adds a new Data Science plugin
to house it and future advanced analytics/data science aggregations.
2019-08-26 10:43:24 -04:00
Lisa Cawley
9413f97c1f
[DOCS] Reformat info and deprecation APIs to use new API format (#44599) 2019-07-18 16:10:22 -07:00
Tal Levy
b5fccd1011
Introduce Spatial Plugin (#44389)
This commit introduces a skeleton Spatial plugin that will be filled-in
with some new licensed features coming to Geo/Spatial land!
2019-07-17 14:18:31 -07:00
Yannick Welsch
f7e2fddee5
Move frozen indices to x-pack module (#44408)
Will facilitate future development of this feature, e.g. backporting of #44286
2019-07-17 14:02:29 +02:00
Julie Tibshirani
f3317eb82d
Add support for 'flattened object' fields. (#42541)
This commit merges the `object-fields` feature branch. The new 'flattened
object' field type allows an entire JSON object to be indexed into a field, and
provides limited search functionality over the field's contents.
2019-06-28 15:33:24 +03:00
Yannick Welsch
e689b20eba
Add voting-only master node (#43410)
A voting-only master-eligible node is a node that can participate in master elections but will not act
as a master in the cluster. In particular, a voting-only node can help elect another master-eligible
node as master, and can serve as a tiebreaker in elections. High availability (HA) clusters require at
least three master-eligible nodes, so that if one of the three nodes is down, then the remaining two
can still elect a master amongst them-selves. This only requires one of the two remaining nodes to
have the capability to act as master, but both need to have voting powers. This means that one of
the three master-eligible nodes can be made as voting-only. If this voting-only node is a dedicated
master, a less powerful machine or a smaller heap-size can be chosen for this node. Alternatively, a
voting-only non-dedicated master node can play the role of the third master-eligible node, which
allows running an HA cluster with only two dedicated master nodes.

Closes #14340

Co-authored-by: David Turner <david.turner@elastic.co>
2019-06-25 17:29:30 +02:00
Ryan Ernst
b638cc101f
Remove native code info from xpack info api (#43125)
The native code info is a portion of the xpack info api that emits
arbitrary info about feature plugins that are backed by native code.
This is currently only used by machine learning. Additionally, it is the
only non enabled/available information reported by the info api.

This commit moves the native code info reporting to the usage api for
machine learning. The commit info reported is only used for debugging
purposes, and not captured by the current uses of the info api
(monitoring and telemetry) since it requires passing the verbose flag.

Long term, this information would be better suited to node info. Until
node info is extendable by plugins, this new location will allow
cleaning up the xpack info api to be implemented in a generic way for
all xpack features.
2019-06-19 08:57:56 -07:00
Mayya Sharipova
952ddf247a
Move dense_vector and sparse_vector to module (#43280) 2019-06-18 08:15:46 -04:00
Ryan Ernst
b3a60da5d5
Remove description from xpack feature sets (#43065)
The description field of xpack featuresets is optionally part of the
xpack info api, when using the verbose flag. However, this information
is unnecessary, as it is better left for documentation (and the existing
descriptions describe anything meaningful). This commit removes the
description field from feature sets.
2019-06-11 09:20:55 -07:00
Hendrik Muhs
869de3f160
Add data frame feature (#38934)
The data frame plugin allows users to create feature indexes by pivoting a source index. In a
nutshell this can be understood as reindex supporting aggregations or similar to the so called entity
centric indexing.

Full history is provided in: feature/data-frame-transforms
2019-02-18 09:16:38 +01:00
Martijn van Groningen
f51bc00fcf
Added ccr to xpack usage infrastructure (#37256)
* Added ccr to xpack usage infrastructure

Closes #37221
2019-01-30 07:58:26 +01:00
Andrei Stefan
00e6fec718
SQL: XPack FeatureSet functionality (#35725)
* Introduced "client.id" parameter for REST requests
* Bug that made the Verifier run twice, fixed in the Analyzer
* Single node IT and unit testing
2018-11-26 07:11:43 +02:00
Tal Levy
67bfdb16ad Merge remote-tracking branch 'upstream/master' into index-lifecycle 2018-10-22 13:09:37 -07:00
Jason Tedor
bf5f0af491
Use trial license in docs tests (#34673)
This commit switches to using a trial license in the docs tests that run
on the default distribution. This is needed so that docs tests can be
executed against non-basic features.
2018-10-21 06:23:42 -04:00
Colin Goodheart-Smithe
ada3e710f6
Renames XPackField.INDEX _LIFCYCLE value to "ilm" (#33270)
This brings the name in line with everywhere else and means that name
seen on the feature usage and `GET _xpack` APIs will match the plugin
name.

This change also removes `IndexLifcycle.NAME` since this was only used
to name the scheduler job and that can be done using
`XPackField.INDEX_LIFECYCLE` instead
2018-08-31 08:29:44 +01:00
Tal Levy
eee1a451fc Merge branch 'master' into index-lifecycle 2018-06-19 11:37:47 -07:00
Lisa Cawley
8fd1f5fbed
[DOCS] Moves the info API to docs (#31121) 2018-06-19 10:33:57 -07:00
Renamed from x-pack/docs/en/rest-api/info.asciidoc (Browse further)