Commit graph

88 commits

Author SHA1 Message Date
James Rodewig
223110491b
[DOCS] Reformat get pipeline API (#47131) 2019-09-26 08:26:01 -04:00
James Rodewig
48471b2e9a
[DOCS] Reformat clone index API docs (#46762) 2019-09-25 12:36:23 -04:00
Lisa Cawley
4da98c9e46
[DOCS] Update data frame transform URLs (#46940) 2019-09-20 13:26:57 -07:00
István Zoltán Szabó
4e11a19371
[DOCS] Reformats count API (#46377)
* [DOCS] Reformats count API.
Co-Authored-By: James Rodewig <james.rodewig@elastic.co>
2019-09-17 09:53:03 +02:00
Lisa Cawley
79c1a6f7fb
[DOCS] Removes data-frames folder (#46760) 2019-09-16 10:23:46 -07:00
lcawl
6145f1765c [DOCS] Fixes formatting of analyzer parameter 2019-09-16 10:02:41 -07:00
Lisa Cawley
b3dfd6e6d0
[DOCS] Updates dataframe transform terminology (#46642) 2019-09-16 08:28:19 -07: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
8d1ad42625
[DOCS] Correct definition for allow_no_indices parameter (#46450) 2019-09-06 14:10:36 -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
James Rodewig
73838499b0
[DOCS] Resort common-parms (#46419) 2019-09-06 09:22:36 -04:00
James Rodewig
565ba9cb88
[DOCS] Reformat index stats API docs (#46322) 2019-09-05 15:03:33 -04:00
James Rodewig
a5c60fb59a
[DOCS] Reformat index segments API docs (#46345) 2019-09-05 08:33:17 -04:00
James Rodewig
bf0b3ce885
[DOCS] Reformat "put index template" API docs (#46297) 2019-09-04 11:47:32 -04:00
James Rodewig
6b010437d2
[DOCS] Add "index template exists" API docs (#46095) 2019-08-29 13:18:47 -04:00
James Rodewig
effb6502d7
[DOCS] Separate add index alias API docs (#46086) 2019-08-29 10:38:48 -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
James Rodewig
947fccbda3
[DOCS] Add get index alias API docs (#46046) 2019-08-29 09:44:58 -04:00
debadair
2dcdbc90f2
[DOCS] Reformats delete by query API (#46051)
* Reformats delete by query API

* Update docs/reference/docs/delete-by-query.asciidoc

Co-Authored-By: James Rodewig <james.rodewig@elastic.co>

* Updated common parms includes.
2019-08-28 19:33:50 -07:00
István Zoltán Szabó
6ba13e9ec3 [DOCS] Adds search-related query parameters to the common parameters. (#46057)
@szabosteve Merging so I can make some additions. Will incorporate the comments from @jrodewig.
2019-08-28 16:44:22 -07: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
James Rodewig
fbecbcf70c
[DOCS] Reformat create index API docs (#45749) 2019-08-26 08:31:31 -04:00
James Rodewig
ad8eb03295
[DOCS] Relocate Ingest API docs to REST API section (#45812) 2019-08-23 11:54:40 -04:00
James Rodewig
4e70b379e4
[DOCS] Reformat get index API docs (#45758) 2019-08-23 11:14:51 -04:00
James Rodewig
46d7849032
Change {var} convention to <var> (#45904) 2019-08-23 10:57:20 -04:00
James Rodewig
00b7dc1950
[DOCS] Reformat get mapping API. Reformat and reuse multi-index params. (#45699) 2019-08-21 09:42:10 -04:00
debadair
9f094d6ecd
[DOCS] Reformat doc delete API reference. (#45422)
* [DOCS] Reformat doc delete API reference.
2019-08-13 09:54:04 -07:00
debadair
009020f569
[DOCS] Reformat index API. (#45415)
* [DOCS] Reformat index API.

* Incorporated review feedback.
2019-08-12 14:50:15 -07:00
István Zoltán Szabó
3830e53f28
[DOCS] Reformats cluster stats API and expands common params (#45270)
Co-Authored-By: James Rodewig <james.rodewig@elastic.co>
2019-08-07 16:46:39 +02:00
James Rodewig
b010fa8835
[DOCS] Reformats cat nodeattrs API (#45255) 2019-08-07 09:31:07 -04:00
James Rodewig
56a380b1a8
[DOCS] Reformats cat indices API (#45239) 2019-08-07 09:08:09 -04:00
James Rodewig
5bf58c279d
[DOCS] Reformat cat count API (#45160) 2019-08-06 08:36:22 -04:00
James Rodewig
4a81606147
[DOCS] Reformats cat allocation API (#45158) 2019-08-05 11:17:37 -04:00
James Rodewig
bc83df1bff
[DOCS] Reformat cat alias API (#45119) 2019-08-05 08:27:15 -04:00
James Rodewig
a9700eee37
[DOCS] Create common parameters file for REST APIs (#45117) 2019-08-02 08:42:33 -04:00
István Zoltán Szabó
b08278ef2a
[DOCS] Amends REST API TOC. (#44948) 2019-07-29 14:06:17 +02:00
James Rodewig
fab98dfa55
[DOCS] Remove heading offsets for REST APIs (#44568)
Several files in the REST APIs nav section are included using
:leveloffset: tags. This increments headings (h2 -> h3, h3 -> h4, etc.)
in those files and removes the :leveloffset: tags.

Other supporting changes:
* Alphabetizes top-level REST API nav items.
* Change 'indices APIs' heading to 'index APIs.'
* Changes 'Snapshot lifecycle management' heading to sentence case.
2019-07-19 14:35:36 -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
Lisa Cawley
4fd8e34662
[DOCS] Moves content to ML anomaly-detection folder (#44520) 2019-07-17 13:48:12 -07:00
James Rodewig
724769071d
[DOCS] Move Elasticsearch APIs to REST APIs section. (#44238) (#44372)
Moves the following API sections under the REST APIs navigations:
- API Conventions
- Document APIs
- Search APIs
- Index APIs (previously named Indices APIs)
- cat APIs
- Cluster APIs

Other supporting changes:
- Removes the previous index APIs page under REST APIs. Adds a redirect for the removed page.
- Removes several [partintro] macros so the docs build correctly.
- Changes anchors for pages that become sections of a parent page.
- Adds several redirects for existing pages that become sections of a parent page.

This commit re-applies changes from #44238. Changes from that PR were reverted due to broken links in several repos. This commit adds redirects for those broken links.
2019-07-17 08:49:22 -04: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
Lisa Cawley
146be77ec3
[DOCS] Separates data frame analytics APIs (#44451)
* [DOCS] Separates data frame analytics APIs

* [DOCS] Adds links between new pages
2019-07-16 13:22:27 -07:00
Lee Hinman
a2e0db7783
Add Snapshot Lifecycle Management (#43934)
* Add SnapshotLifecycleService and related CRUD APIs

This commit adds `SnapshotLifecycleService` as a new service under the ilm
plugin. This service handles snapshot lifecycle policies by scheduling based on
the policies defined schedule.

This also includes the get, put, and delete APIs for these policies

Relates to #38461

* Make scheduledJobIds return an immutable set

* Use Object.equals for SnapshotLifecyclePolicy

* Remove unneeded TODO

* Implement ToXContentFragment on SnapshotLifecyclePolicyItem

* Copy contents of the scheduledJobIds

* Handle snapshot lifecycle policy updates and deletions (#40062)

(Note this is a PR against the `snapshot-lifecycle-management` feature branch)

This adds logic to `SnapshotLifecycleService` to handle updates and deletes for
snapshot policies. Policies with incremented versions have the old policy
cancelled and the new one scheduled. Deleted policies have their schedules
cancelled when they are no longer present in the cluster state metadata.

Relates to #38461

* Take a snapshot for the policy when the SLM policy is triggered (#40383)

(This is a PR for the `snapshot-lifecycle-management` branch)

This commit fills in `SnapshotLifecycleTask` to actually perform the
snapshotting when the policy is triggered. Currently there is no handling of the
results (other than logging) as that will be added in subsequent work.

This also adds unit tests and an integration test that schedules a policy and
ensures that a snapshot is correctly taken.

Relates to #38461

* Record most recent snapshot policy success/failure (#40619)

Keeping a record of the results of the successes and failures will aid
troubleshooting of policies and make users more confident that their
snapshots are being taken as expected.

This is the first step toward writing history in a more permanent
fashion.

* Validate snapshot lifecycle policies (#40654)

(This is a PR against the `snapshot-lifecycle-management` branch)

With the commit, we now validate the content of snapshot lifecycle policies when
the policy is being created or updated. This checks for the validity of the id,
name, schedule, and repository. Additionally, cluster state is checked to ensure
that the repository exists prior to the lifecycle being added to the cluster
state.

Part of #38461

* Hook SLM into ILM's start and stop APIs (#40871)

(This pull request is for the `snapshot-lifecycle-management` branch)

This change allows the existing `/_ilm/stop` and `/_ilm/start` APIs to also
manage snapshot lifecycle scheduling. When ILM is stopped all scheduled jobs are
cancelled.

Relates to #38461

* Add tests for SnapshotLifecyclePolicyItem (#40912)

Adds serialization tests for SnapshotLifecyclePolicyItem.

* Fix improper import in build.gradle after master merge

* Add human readable version of modified date for snapshot lifecycle policy (#41035)

* Add human readable version of modified date for snapshot lifecycle policy

This small change changes it from:

```
...
"modified_date": 1554843903242,
...
```

To

```
...
"modified_date" : "2019-04-09T21:05:03.242Z",
"modified_date_millis" : 1554843903242,
...
```

Including the `"modified_date"` field when the `?human` field is used.

Relates to #38461

* Fix test

* Add API to execute SLM policy on demand (#41038)

This commit adds the ability to perform a snapshot on demand for a policy. This
can be useful to take a snapshot immediately prior to performing some sort of
maintenance.

```json
PUT /_ilm/snapshot/<policy>/_execute
```

And it returns the response with the generated snapshot name:

```json
{
  "snapshot_name" : "production-snap-2019.04.09-rfyv3j9qreixkdbnfuw0ug"
}
```

Note that this does not allow waiting for the snapshot, and the snapshot could
still fail. It *does* record this information into the cluster state similar to
a regularly trigged SLM job.

Relates to #38461

* Add next_execution to SLM policy metadata (#41221)

* Add next_execution to SLM policy metadata

This adds the next time a snapshot lifecycle policy will be executed when
retriving a policy's metadata, for example:

```json
GET /_ilm/snapshot?human
{
  "production" : {
    "version" : 1,
    "modified_date" : "2019-04-15T21:16:21.865Z",
    "modified_date_millis" : 1555362981865,
    "policy" : {
      "name" : "<production-snap-{now/d}>",
      "schedule" : "*/30 * * * * ?",
      "repository" : "repo",
      "config" : {
        "indices" : [
          "foo-*",
          "important"
        ],
        "ignore_unavailable" : true,
        "include_global_state" : false
      }
    },
    "next_execution" : "2019-04-15T21:16:30.000Z",
    "next_execution_millis" : 1555362990000
  },
  "other" : {
    "version" : 1,
    "modified_date" : "2019-04-15T21:12:19.959Z",
    "modified_date_millis" : 1555362739959,
    "policy" : {
      "name" : "<other-snap-{now/d}>",
      "schedule" : "0 30 2 * * ?",
      "repository" : "repo",
      "config" : {
        "indices" : [
          "other"
        ],
        "ignore_unavailable" : false,
        "include_global_state" : true
      }
    },
    "next_execution" : "2019-04-16T02:30:00.000Z",
    "next_execution_millis" : 1555381800000
  }
}
```

Relates to #38461

* Fix and enhance tests

* Figured out how to Cron

* Change SLM endpoint from /_ilm/* to /_slm/* (#41320)

This commit changes the endpoint for snapshot lifecycle management from:

```
GET /_ilm/snapshot/<policy>
```

to:

```
GET /_slm/policy/<policy>
```

It mimics the ILM path only using `slm` instead of `ilm`.

Relates to #38461

* Add initial documentation for SLM (#41510)

* Add initial documentation for SLM

This adds the initial documentation for snapshot lifecycle management.

It also includes the REST spec API json files since they're sort of
documentation.

Relates to #38461

* Add `manage_slm` and `read_slm` roles (#41607)

* Add `manage_slm` and `read_slm` roles

This adds two more built in roles -

`manage_slm` which has permission to perform any of the SLM actions, as well as
stopping, starting, and retrieving the operation status of ILM.

`read_slm` which has permission to retrieve snapshot lifecycle policies as well
as retrieving the operation status of ILM.

Relates to #38461

* Add execute to the test

* Fix ilm -> slm typo in test

* Record SLM history into an index (#41707)

It is useful to have a record of the actions that Snapshot Lifecycle
Management takes, especially for the purposes of alerting when a
snapshot fails or has not been taken successfully for a certain amount of
time.

This adds the infrastructure to record SLM actions into an index that
can be queried at leisure, along with a lifecycle policy so that this
history does not grow without bound.

Additionally,
SLM automatically setting up an index + lifecycle policy leads to
`index_lifecycle` custom metadata in the cluster state, which some of
the ML tests don't know how to deal with due to setting up custom
`NamedXContentRegistry`s.  Watcher would cause the same problem, but it
is already disabled (for the same reason).

* High Level Rest Client support for SLM (#41767)

* High Level Rest Client support for SLM

This commit add HLRC support for SLM.

Relates to #38461

* Fill out documentation tests with tags

* Add more callouts and asciidoc for HLRC

* Update javadoc links to real locations

* Add security test testing SLM cluster privileges (#42678)

* Add security test testing SLM cluster privileges

This adds a test to `PermissionsIT` that uses the `manage_slm` and `read_slm`
cluster privileges.

Relates to #38461

* Don't redefine vars

*  Add Getting Started Guide for SLM  (#42878)

This commit adds a basic Getting Started Guide for SLM.

* Include SLM policy name in Snapshot metadata (#43132)

Keep track of which SLM policy in the metadata field of the Snapshots
taken by SLM. This allows users to more easily understand where the
snapshot came from, and will enable future SLM features such as
retention policies.

* Fix compilation after master merge

* [TEST] Move exception wrapping for devious exception throwing

Fixes an issue where an exception was created from one line and thrown in another.

* Fix SLM for the change to AcknowledgedResponse

* Add Snapshot Lifecycle Management Package Docs (#43535)

* Fix compilation for transport actions now that task is required

* Add a note mentioning the privileges needed for SLM (#43708)

* Add a note mentioning the privileges needed for SLM

This adds a note to the top of the "getting started with SLM"
documentation mentioning that there are two built-in privileges to
assist with creating roles for SLM users and administrators.

Relates to #38461

* Mention that you can create snapshots for indices you can't read

* Fix REST tests for new number of cluster privileges

* Mute testThatNonExistingTemplatesAreAddedImmediately (#43951)

* Fix SnapshotHistoryStoreTests after merge

* Remove overridden newResponse functions that have been removed
2019-07-15 12:04:50 -06:00
Lisa Cawley
2316703b93
[DOCS] Removes unnecessary resource definition pages (#44289)
* [DOCS] Removes calendar resource definition page

* [DOCS] Removes scheduled event and filter resource definitions
2019-07-15 09:44:57 -07:00
James Rodewig
2c1939f5f9 Revert "[DOCS] Relocate several APIs to REST APIs section (#44238)"
This reverts commit 6ebd59791a.
2019-07-12 18:06:44 -04:00
James Rodewig
562d609c45 [DOCS] Relocate several APIs to REST APIs section (#44238) 2019-07-12 12:15:01 -04:00
James Rodewig
3bdeb45ed7 Revert "[DOCS] Relocate several APIs to REST APIs section (#44238)"
This reverts commit 6ebd59791a.
2019-07-11 17:00:45 -04:00
James Rodewig
6ebd59791a
[DOCS] Relocate several APIs to REST APIs section (#44238) 2019-07-11 16:22:57 -04:00