Commit graph

19 commits

Author SHA1 Message Date
Seth Michael Larson
b61e351152
[7.17] Add pagination parameters to API spec and docs for 'snapshot.get' API (#88962) 2022-07-30 06:24:03 +09:30
Joe Gallo
7749d6a4c5 Fix get-snapshot-api :docs:integTest (#83273) 2022-01-28 12:33:42 -05:00
James Rodewig
c13cd213bc
[DOCS] Overhaul snapshot and restore docs (#79081) (#80733)
Makes several changes to consolidate snapshot and backup-related docs.

Highlights:

* Adds info about supported ESS snapshot repository types
* Adds docs for Kibana's Snapshot and Restore feature
* Combines tutorial pages related to taking and managing snapshots
* Consolidates explanations of the snapshot process
* Incorporates SLM into the snapshot tutorial
* Removes duplicate "back up a cluster" pages
2021-11-15 13:23:48 -05:00
James Rodewig
684afabdb8
[DOCS] Clarify max_count only counts successful snapshot attempts (#79749) (#79871)
The create SLM policy API's `max_count` parameter limits the number of
snapshots for a policy. Only successful snapshot attempts count toward
this limit. Failed snapshot attempts do not.
2021-10-26 17:33:56 -04:00
Armin Braun
5d043e02a2
Implement from_sort_value Parameter in Get Snapshots API (#77618) (#79318)
Add `from_sort_value` parameter to allow for filtering snapshots by comparing to concrete sort column
values similar to the existing after parameter`.
2021-10-17 17:53:15 +02:00
Armin Braun
29c1fcb238
Implement Exclude Patterns for Snapshot- and Repository Names in Get Snapshots API (#77308) (#79315)
It's in the title. Adds support for exclude patterns combined with wildcard requests
similar to what we support for index names.
2021-10-17 15:47:47 +02:00
Armin Braun
08a83659f3
Add Filtering by SLM Policy to Get Snapshots API (#77321) (#79308)
It's in the title, add new `slm_policy_filter` param as a filter to the get snapshots API.
2021-10-17 13:50:25 +02:00
edh-oss
6869f5bc0d 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:11:54 +01:00
Armin Braun
85431d8106
Implement Sort By Repository Name in Get Snapshots API (#77049) (#77112)
This one is the last sort column not yet implemented but used by Kibana.
2021-09-01 14:23:26 +02:00
Armin Braun
84d7831817
Add Sort By Shard Count and Failed Shard Count to Get Snapshots API (#77011) (#77018)
It's in the title. As requested by the Kibana team, adding these two additional sort columns.

relates #74350
2021-08-30 14:58:48 +02:00
Armin Braun
d356a4b603
Implement Numeric Pagination in Get Snapshots API (#76532)
* Return Total Result Count and Remaining Count in Get Snapshots Response (#76150)

Add total result count and remaining count to get snapshots response.

* Implement Numeric Offset Parameter in Get Snapshots API (#76233)

Add numeric offset parameter to this API.

Relates #74350
2021-08-14 18:29:14 +02:00
Armin Braun
d64a72c127
Snapshot Pagination and Scalability Improvements Backport to 7.x (#74676)
Backport of the recently introduced snapshot pagination and scalability improvements listed below.
Merged as a single backport because the `7.x` and master snapshot status API logic had massively diverged between master and 7.x. With the work in the below PRs, the logic in master and 7.x once again has been aligned very closely again.

#72842
#73172
#73199
#73570 
#73952
#74236 
#74451 (this one is only partly applicable as it was mainly a change to master to align `master` and `7.x` branches)
2021-06-29 15:16:26 +02:00
Armin Braun
a1a323b417
Fix Snapshot Docs Listing Query Params in Body Incorrectly (#74196) (#74205)
Both of these APIs don't parse request bodies, the parameters are all taken
from the query string. Also, included the master timeout param include
as it was missing here also.
2021-06-16 20:47:04 +02:00
James Rodewig
ab88557021
[DOCS] Fix indent in get snapshot API response (#72219) (#72254)
Co-authored-by: Febrian Setianto <febrian.setianto@gmail.com>
2021-04-26 14:15:21 -04:00
David Turner
160141aab6
Track index details in SnapshotInfo (#71902)
This commit adds some per-index statistics to the `SnapshotInfo` blob:

- number of shards
- total size in bytes
- maximum number of segments per shard

It also exposes these statistics in the get snapshot API.

Backport of #71754 to 7.x
2021-04-20 12:06:16 +01:00
Gordon Brown
2fde28e318
[7.x] Introduce "Feature States" for managing snapshots of system indices (#63513)
This PR expands the meaning of `include_global_state` for snapshots to include system indices. If `include_global_state` is `true` on creation, system indices will be included in the snapshot regardless of the contents of the `indices` field. If `include_global_state` is `true` on restoration, system indices will be restored (if included in the snapshot), regardless of the contents of the `indices` field. Index renaming is not applied to system indices, as system indices rely on their names matching certain patterns. If restored system indices are already present, they are automatically deleted prior to restoration from the snapshot to avoid conflicts.

This behavior can be overridden to an extent by including a new field in the snapshot creation or restoration call, `feature_states`, which contains an array of strings indicating the "feature" for which system indices should be snapshotted or restored. For example, this call will only restore the `watcher` and `security` system indices (in addition to `index_1`):

```
POST /_snapshot/my_repository/snapshot_2/_restore
{
  "indices": "index_1",
  "include_global_state": true,
  "feature_states": ["watcher", "security"]
}
```

If `feature_states` is present, the system indices associated with those features will be snapshotted or restored regardless of the value of `include_global_state`. All system indices can be omitted by providing a special value of `none` (`"feature_states": ["none"]`), or included by omitting the field or explicitly providing an empty array (`"feature_states": []`), similar to the `indices` field.

The list of currently available features can be retrieved via a new "Get Snapshottable Features" API:
```
GET /_snapshottable_features
```

which returns a response of the form:
```
{
    "features": [
        {
            "name": "tasks",
            "description": "Manages task results"
        },
        {
            "name": "kibana",
            "description": "Manages Kibana configuration and reports"
        }
    ]
}
```

Features currently map one-to-one with `SystemIndexPlugin`s, but this should be considered an implementation detail. The Get Snapshottable Features API and snapshot creation rely upon all relevant plugins being installed on the master node.

Further, the list of feature states included in a given snapshot is exposed by the Get Snapshot API, which now includes a new field, `feature_states`, which contains a list of the feature states and their associated system indices which are included in the snapshot. All system indices in feature states are also included in the `indices` array for backwards compatibility, although explicitly requesting system indices included in a feature state is deprecated. For example, an excerpt from the Get Snapshot API showing `feature_states`:
```
"feature_states": [
    {
        "feature_name": "tasks",
        "indices": [
            ".tasks"
        ]
    }
],
"indices": [
    ".tasks",
    "test1",
    "test2"
]
```

Co-authored-by: William Brafford <william.brafford@elastic.co>
2021-02-11 15:34:09 -07:00
James Rodewig
10df154ac8
[DOCS] Add security privileges to snapshot/restore API docs (#67955) (#68383) 2021-02-02 09:50:13 -05:00
James Rodewig
aea83909d9
[DOCS] Fix case for 'Boolean' (#64299) (#64341) 2020-10-29 10:04:20 -04:00
Adam Locke
96a06685cf
[7.x] [DOCS] Adding get snapshot api docs (#59238)
* [DOCS] Adding get snapshot API docs (#59098)

* Adding page for get snapshot API.

* Adding values for state and cleaning up some other formatting.

* Adding missing forward slash to GET request.

* Updating values for start_time and end_time in TESTRESPONSE.

* Swap "return" for "retrieve"

* Swap "return" for "retrieve" 2

* Change .snapshot to .response

* Adding response parameters and incorporating edits from review.

* Update response example to include repository info

* Change dash to underscore

* Add data type for snapshot in response

* Incorporating review comments and adding missing response definitions.

* Minor rewording in description.

* Removing multi-snapshot support for 7.x.

* Changing end_time value from build error.

* Removing .response from snippet testing.
2020-07-08 16:40:35 -04:00