forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Snapshots: show slm and status (elastic#199622)
Closes [elastic#148241](elastic#148241) ## Summary This PR introduces a few changes in the snapshot and restore plugin. #### Snapshots tab * The state column has been aded to the table * In the detail flyout, it has been changed the way in which the status is displayed (icon and text). * No new test needed since this info was already there. The related tests have been updated. <table> <tr> <td style="padding-right: 10px;"> <img alt="Screenshot 2024-11-27 at 15 17 03" src="https://github.com/user-attachments/assets/92b5c5cf-d90b-454c-9cf7-2eb101562c5f"> </td> <td> <img alt="Screenshot 2024-11-27 at 15 54 32" src="https://github.com/user-attachments/assets/62395bad-4c70-44bb-84b3-c8a30ae9278a"> </td> </tr> </table> #### Policies tab * The copy of the callout for warning that two or more policies have the same schedule has been changed. For testing that, you need to have two or more policies that have the same time por execution. No test added for this, is only a copy change [[code](https://github.com/elastic/kibana/pull/199622/files#diff-e8e12f0dfdc97e4e064f8a07965312c8c91ca66578bdcaf5ee807e879cebcb6eR207)] <img width="1249" alt="Screenshot 2024-11-27 at 15 17 25" src="https://github.com/user-attachments/assets/5417910f-573a-4c22-a5e2-44ec2ce256b3"> * A new callout has been added to warn that the SLM status is different from “running”. SLM status is "running" by default, but it could happen that the user stop it for any reason and then does not restart it. This causes policies not to run when they are scheduled. To known the SLM status a new api call has been introduced (`GET _slm/status`). * I've created a new doc link to https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-start.html * I've added new tests for the new api call. <img width="1246" alt="Screenshot 2024-11-27 at 15 59 56" src="https://github.com/user-attachments/assets/cd5ae491-16a4-4a68-a223-f44ce398ac2f"> ## Testing You will need to have at least one policy to test this. For that, you can run Elastic using the following: ``` yarn es snapshot --license=trial -E path.repo=/tmp/es-backups ``` From the console, you can add a repository (you can also do it from the UI): ``` PUT /_snapshot/my_backup { "type": "fs", "settings": { "location": "/tmp/es-backups", "chunk_size": "10mb" } } ```` And for creating a policy you can run this: ``` PUT _slm/policy/nightly-snapshots { "schedule": "0 30 1 * * ?", "name": "<nightly-snap-{now/d}>", "repository": "my_backup1", "retention": { "expire_after": "30d", "min_count": 5, "max_count": 50 } } ``` SLM status should be started by default (unless you have stopped it). For starting it you can use `POST /_slm/start` and for stop it `POST /_slm/stop` ## Demo https://github.com/user-attachments/assets/b83cd3ba-4821-4295-87f2-ecf427ec46e0 --------- Co-authored-by: shainaraskas <[email protected]> (cherry picked from commit 6d3b5c2)
- Loading branch information
1 parent
bf23999
commit 07a87bd
Showing
17 changed files
with
179 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.