-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show the _slm/status somewhere in Kibana Managment #148241
Comments
Pinging @elastic/platform-deployment-management (Team:Deployment Management) |
Hi @stouch We do show the policy status in the details flyout of each policy. Is this what you had in mind? |
No I mean the _slm/status (it may be stopped but impossible to know it from the GUI) I had to make an API request to get the status : https://discuss.elastic.co/t/slm-snapshots-are-just-ignored-when-scheduled-but-manual-execute-works/321429/3 |
Pinging @elastic/kibana-management (Team:Kibana Management) |
I have updated the issue description with the design that we plan to implement. |
I have some doubts about this issue. In the policies tab the proposal is to display the snapshot lifecycle management (SLM) status for each policy, but from what I've learned from reading the documentation and testing on the console, the SLM status is common for every policy.
You can start and stop SLM but it’ll affect the whole lifecycle. So, the info proposed in the mocks will be redundant since it would always be the same status for all the policies: Another important thing to have in mind is that when the SLM is stopped, the policy doesn’t even run and it won’t be considered a failure. It’ll not be reflected in the snapshot list, it would just be skipped. |
Hi @jovana-andjelkovic! in the current implementation of detail for an snapshot we have a tooltip for the partial state. Do we wanna keep it? I think is useful information. In case do wanna keep it, should we also display it in the list? How this would look like if we keep it in the new implementation: |
@SoniaSanzV great catch! Yes let's keep the tooltip and add it to the table view as well. If any other states have tooltips as well, let's keep them. Let's maybe add tooltip on hover of the "status" component in table, rather than adding in the question mark icon. |
Blocked waiting for re-design |
…nto snapshots/showSlmAndStatus/elastic#148241
Closes [#148241](#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]>
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)
# Backport This will backport the following commits from `main` to `8.x`: - [Snapshots: show slm and status (#199622)](#199622) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Sonia Sanz Vivas","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-09T08:57:41Z","message":"Snapshots: show slm and status (#199622)\n\nCloses [#148241](https://github.com/elastic/kibana/issues/148241)\r\n\r\n## Summary\r\n\r\nThis PR introduces a few changes in the snapshot and restore plugin.\r\n\r\n#### Snapshots tab\r\n* The state column has been aded to the table\r\n* In the detail flyout, it has been changed the way in which the status\r\nis displayed (icon and text).\r\n* No new test needed since this info was already there. The related\r\ntests have been updated.\r\n\r\n<table>\r\n <tr>\r\n <td style=\"padding-right: 10px;\">\r\n\r\n\r\n<img alt=\"Screenshot 2024-11-27 at 15 17 03\"\r\nsrc=\"https://github.com/user-attachments/assets/92b5c5cf-d90b-454c-9cf7-2eb101562c5f\">\r\n\r\n\r\n </td>\r\n <td>\r\n<img alt=\"Screenshot 2024-11-27 at 15 54 32\"\r\nsrc=\"https://github.com/user-attachments/assets/62395bad-4c70-44bb-84b3-c8a30ae9278a\">\r\n\r\n \r\n\r\n </td>\r\n </tr>\r\n</table>\r\n\r\n\r\n#### Policies tab\r\n* The copy of the callout for warning that two or more policies have the\r\nsame schedule has been changed. For testing that, you need to have two\r\nor more policies that have the same time por execution. No test added\r\nfor this, is only a copy change\r\n[[code](https://github.com/elastic/kibana/pull/199622/files#diff-e8e12f0dfdc97e4e064f8a07965312c8c91ca66578bdcaf5ee807e879cebcb6eR207)]\r\n<img width=\"1249\" alt=\"Screenshot 2024-11-27 at 15 17 25\"\r\nsrc=\"https://github.com/user-attachments/assets/5417910f-573a-4c22-a5e2-44ec2ce256b3\">\r\n\r\n\r\n* A new callout has been added to warn that the SLM status is different\r\nfrom “running”. SLM status is \"running\" by default, but it could happen\r\nthat the user stop it for any reason and then does not restart it. This\r\ncauses policies not to run when they are scheduled. To known the SLM\r\nstatus a new api call has been introduced (`GET _slm/status`).\r\n* I've created a new doc link to\r\nhttps://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-start.html\r\n * I've added new tests for the new api call.\r\n \r\n<img width=\"1246\" alt=\"Screenshot 2024-11-27 at 15 59 56\"\r\nsrc=\"https://github.com/user-attachments/assets/cd5ae491-16a4-4a68-a223-f44ce398ac2f\">\r\n\r\n\r\n \r\n\r\n## Testing\r\nYou will need to have at least one policy to test this. For that, you\r\ncan run Elastic using the following:\r\n```\r\nyarn es snapshot --license=trial -E path.repo=/tmp/es-backups\r\n```\r\n\r\nFrom the console, you can add a repository (you can also do it from the\r\nUI):\r\n```\r\nPUT /_snapshot/my_backup\r\n{\r\n \"type\": \"fs\",\r\n \"settings\": {\r\n \"location\": \"/tmp/es-backups\",\r\n \"chunk_size\": \"10mb\"\r\n }\r\n}\r\n````\r\n\r\nAnd for creating a policy you can run this:\r\n```\r\nPUT _slm/policy/nightly-snapshots\r\n{\r\n \"schedule\": \"0 30 1 * * ?\", \r\n \"name\": \"<nightly-snap-{now/d}>\", \r\n \"repository\": \"my_backup1\",\r\n \"retention\": { \r\n \"expire_after\": \"30d\",\r\n \"min_count\": 5,\r\n \"max_count\": 50\r\n }\r\n}\r\n```\r\n\r\nSLM status should be started by default (unless you have stopped it).\r\nFor starting it you can use `POST /_slm/start` and for stop it `POST\r\n/_slm/stop`\r\n\r\n## Demo\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/b83cd3ba-4821-4295-87f2-ecf427ec46e0\r\n\r\n---------\r\n\r\nCo-authored-by: shainaraskas <[email protected]>","sha":"6d3b5c264b771a0fec3eb29112286f032496cf5d","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Kibana Management","release_note:skip","Feature:Snapshot and Restore","v9.0.0","backport:prev-minor"],"title":"Snapshots: show slm and status","number":199622,"url":"https://github.com/elastic/kibana/pull/199622","mergeCommit":{"message":"Snapshots: show slm and status (#199622)\n\nCloses [#148241](https://github.com/elastic/kibana/issues/148241)\r\n\r\n## Summary\r\n\r\nThis PR introduces a few changes in the snapshot and restore plugin.\r\n\r\n#### Snapshots tab\r\n* The state column has been aded to the table\r\n* In the detail flyout, it has been changed the way in which the status\r\nis displayed (icon and text).\r\n* No new test needed since this info was already there. The related\r\ntests have been updated.\r\n\r\n<table>\r\n <tr>\r\n <td style=\"padding-right: 10px;\">\r\n\r\n\r\n<img alt=\"Screenshot 2024-11-27 at 15 17 03\"\r\nsrc=\"https://github.com/user-attachments/assets/92b5c5cf-d90b-454c-9cf7-2eb101562c5f\">\r\n\r\n\r\n </td>\r\n <td>\r\n<img alt=\"Screenshot 2024-11-27 at 15 54 32\"\r\nsrc=\"https://github.com/user-attachments/assets/62395bad-4c70-44bb-84b3-c8a30ae9278a\">\r\n\r\n \r\n\r\n </td>\r\n </tr>\r\n</table>\r\n\r\n\r\n#### Policies tab\r\n* The copy of the callout for warning that two or more policies have the\r\nsame schedule has been changed. For testing that, you need to have two\r\nor more policies that have the same time por execution. No test added\r\nfor this, is only a copy change\r\n[[code](https://github.com/elastic/kibana/pull/199622/files#diff-e8e12f0dfdc97e4e064f8a07965312c8c91ca66578bdcaf5ee807e879cebcb6eR207)]\r\n<img width=\"1249\" alt=\"Screenshot 2024-11-27 at 15 17 25\"\r\nsrc=\"https://github.com/user-attachments/assets/5417910f-573a-4c22-a5e2-44ec2ce256b3\">\r\n\r\n\r\n* A new callout has been added to warn that the SLM status is different\r\nfrom “running”. SLM status is \"running\" by default, but it could happen\r\nthat the user stop it for any reason and then does not restart it. This\r\ncauses policies not to run when they are scheduled. To known the SLM\r\nstatus a new api call has been introduced (`GET _slm/status`).\r\n* I've created a new doc link to\r\nhttps://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-start.html\r\n * I've added new tests for the new api call.\r\n \r\n<img width=\"1246\" alt=\"Screenshot 2024-11-27 at 15 59 56\"\r\nsrc=\"https://github.com/user-attachments/assets/cd5ae491-16a4-4a68-a223-f44ce398ac2f\">\r\n\r\n\r\n \r\n\r\n## Testing\r\nYou will need to have at least one policy to test this. For that, you\r\ncan run Elastic using the following:\r\n```\r\nyarn es snapshot --license=trial -E path.repo=/tmp/es-backups\r\n```\r\n\r\nFrom the console, you can add a repository (you can also do it from the\r\nUI):\r\n```\r\nPUT /_snapshot/my_backup\r\n{\r\n \"type\": \"fs\",\r\n \"settings\": {\r\n \"location\": \"/tmp/es-backups\",\r\n \"chunk_size\": \"10mb\"\r\n }\r\n}\r\n````\r\n\r\nAnd for creating a policy you can run this:\r\n```\r\nPUT _slm/policy/nightly-snapshots\r\n{\r\n \"schedule\": \"0 30 1 * * ?\", \r\n \"name\": \"<nightly-snap-{now/d}>\", \r\n \"repository\": \"my_backup1\",\r\n \"retention\": { \r\n \"expire_after\": \"30d\",\r\n \"min_count\": 5,\r\n \"max_count\": 50\r\n }\r\n}\r\n```\r\n\r\nSLM status should be started by default (unless you have stopped it).\r\nFor starting it you can use `POST /_slm/start` and for stop it `POST\r\n/_slm/stop`\r\n\r\n## Demo\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/b83cd3ba-4821-4295-87f2-ecf427ec46e0\r\n\r\n---------\r\n\r\nCo-authored-by: shainaraskas <[email protected]>","sha":"6d3b5c264b771a0fec3eb29112286f032496cf5d"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199622","number":199622,"mergeCommit":{"message":"Snapshots: show slm and status (#199622)\n\nCloses [#148241](https://github.com/elastic/kibana/issues/148241)\r\n\r\n## Summary\r\n\r\nThis PR introduces a few changes in the snapshot and restore plugin.\r\n\r\n#### Snapshots tab\r\n* The state column has been aded to the table\r\n* In the detail flyout, it has been changed the way in which the status\r\nis displayed (icon and text).\r\n* No new test needed since this info was already there. The related\r\ntests have been updated.\r\n\r\n<table>\r\n <tr>\r\n <td style=\"padding-right: 10px;\">\r\n\r\n\r\n<img alt=\"Screenshot 2024-11-27 at 15 17 03\"\r\nsrc=\"https://github.com/user-attachments/assets/92b5c5cf-d90b-454c-9cf7-2eb101562c5f\">\r\n\r\n\r\n </td>\r\n <td>\r\n<img alt=\"Screenshot 2024-11-27 at 15 54 32\"\r\nsrc=\"https://github.com/user-attachments/assets/62395bad-4c70-44bb-84b3-c8a30ae9278a\">\r\n\r\n \r\n\r\n </td>\r\n </tr>\r\n</table>\r\n\r\n\r\n#### Policies tab\r\n* The copy of the callout for warning that two or more policies have the\r\nsame schedule has been changed. For testing that, you need to have two\r\nor more policies that have the same time por execution. No test added\r\nfor this, is only a copy change\r\n[[code](https://github.com/elastic/kibana/pull/199622/files#diff-e8e12f0dfdc97e4e064f8a07965312c8c91ca66578bdcaf5ee807e879cebcb6eR207)]\r\n<img width=\"1249\" alt=\"Screenshot 2024-11-27 at 15 17 25\"\r\nsrc=\"https://github.com/user-attachments/assets/5417910f-573a-4c22-a5e2-44ec2ce256b3\">\r\n\r\n\r\n* A new callout has been added to warn that the SLM status is different\r\nfrom “running”. SLM status is \"running\" by default, but it could happen\r\nthat the user stop it for any reason and then does not restart it. This\r\ncauses policies not to run when they are scheduled. To known the SLM\r\nstatus a new api call has been introduced (`GET _slm/status`).\r\n* I've created a new doc link to\r\nhttps://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-start.html\r\n * I've added new tests for the new api call.\r\n \r\n<img width=\"1246\" alt=\"Screenshot 2024-11-27 at 15 59 56\"\r\nsrc=\"https://github.com/user-attachments/assets/cd5ae491-16a4-4a68-a223-f44ce398ac2f\">\r\n\r\n\r\n \r\n\r\n## Testing\r\nYou will need to have at least one policy to test this. For that, you\r\ncan run Elastic using the following:\r\n```\r\nyarn es snapshot --license=trial -E path.repo=/tmp/es-backups\r\n```\r\n\r\nFrom the console, you can add a repository (you can also do it from the\r\nUI):\r\n```\r\nPUT /_snapshot/my_backup\r\n{\r\n \"type\": \"fs\",\r\n \"settings\": {\r\n \"location\": \"/tmp/es-backups\",\r\n \"chunk_size\": \"10mb\"\r\n }\r\n}\r\n````\r\n\r\nAnd for creating a policy you can run this:\r\n```\r\nPUT _slm/policy/nightly-snapshots\r\n{\r\n \"schedule\": \"0 30 1 * * ?\", \r\n \"name\": \"<nightly-snap-{now/d}>\", \r\n \"repository\": \"my_backup1\",\r\n \"retention\": { \r\n \"expire_after\": \"30d\",\r\n \"min_count\": 5,\r\n \"max_count\": 50\r\n }\r\n}\r\n```\r\n\r\nSLM status should be started by default (unless you have stopped it).\r\nFor starting it you can use `POST /_slm/start` and for stop it `POST\r\n/_slm/stop`\r\n\r\n## Demo\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/b83cd3ba-4821-4295-87f2-ecf427ec46e0\r\n\r\n---------\r\n\r\nCo-authored-by: shainaraskas <[email protected]>","sha":"6d3b5c264b771a0fec3eb29112286f032496cf5d"}}]}] BACKPORT--> Co-authored-by: Sonia Sanz Vivas <[email protected]>
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]>
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]>
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]>
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]>
Describe the feature:
Like some other users, I encountered this issue : [slm] Snapshots are just ignored when scheduled, but manual _execute works - #5 by stouch
Even if it can look like a dummy issue, I think it would be nice to get the _slm/status status information somewhere in the Snaphot Managment page of Kibana (<kibana_url>/app/management/data/snapshot_restore/snapshots).
Right now, when your slm status is STOPPED, nothing alerts you. Or maybe i missed it ?
Describe a specific use case for the feature:
It would avoid this kind of problem : [slm] Snapshots are just ignored when scheduled, but manual _execute works - #5 by stouch
Proposal
The text was updated successfully, but these errors were encountered: