Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…97817) # Backport This will backport the following commits from `main` to `8.x`: - [[Dataset Quality] Add fix it flow for field limit (#195561)](#195561) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Achyut Jhunjhunwala","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-25T09:20:26Z","message":"[Dataset Quality] Add fix it flow for field limit (#195561)\n\n## Summary\r\n\r\nCloses - https://github.com/elastic/kibana/issues/190330\r\n\r\nThis PR implements the logic to support \r\n\r\n- One click increasing of Field Limit for Field Limit Issues (applicable\r\non for Integrations). For Non Integrations, only text is displayed as to\r\nhow they can do it.\r\n- The One click increase updates the linked custom component template as\r\nwell as the last backing Index\r\n- If Last Backing Index update fails due to any reason, it provides user\r\nan option to trigger a Rollover manually.\r\n\r\n## Demo\r\n\r\nNot possible, to many things to display 😆 \r\n\r\n## What's Pending ?\r\n\r\nTests\r\n\r\n- [x] API tests\r\n - [x] Settings API\r\n - [x] Rollover API\r\n - [x] Apply New limit API\r\n- [x] FTR tests\r\n- [x] Displaying of various issues for integrations and non integrations\r\n - [x] Fix it Flow Good case, without Rollover\r\n - [x] Fix it Flow Good case, with Rollover\r\n- [x] Manual Mitigation - Click on Component Template shold navigate to\r\nproper logic based on Integration / Non\r\n - [x] Manual Mitigation - Ingest Pipeline\r\n - [x] Link for official Documentation\r\n \r\n ## How to setup a local environment\r\n \r\nWe will be setting up 2 different data streams, one with integration and\r\none without. Please follow the steps in the exact order\r\n \r\n1. Start Local ES and Local Kibana\r\n2. Install Nginx Integration 1st\r\n3. Ingest data as per script here -\r\nhttps://gist.github.com/achyutjhunjhunwala/03ea29190c6594544f584d2f0efa71e5\r\n4. Set the Limit for the 2 datasets\r\n\r\n```\r\nPUT logs-synth.3-default/_settings\r\n{\r\n \"mapping.total_fields.limit\": 36\r\n}\r\n\r\n// Set the limit for Nginx\r\nPUT logs-nginx.access-default/_settings\r\n{\r\n \"mapping.total_fields.limit\": 52\r\n}\r\n```\r\n\r\n5. Now uncomment line number 59 from the synthtrace script to enable\r\ncloud.project.id field and run the scenario again\r\n6. Do a Rollover\r\n\r\n```\r\nPOST logs-synth.3-default/_rollover\r\nPOST logs-nginx.access-default/_rollover\r\n```\r\n\r\n7. Get last backing index for both dataset\r\n\r\n```\r\nGET _data_stream/logs-synth.3-default/\r\nGET _data_stream/logs-nginx.access-default\r\n```\r\n\r\n8. Increase the Limit by 1 but for last backing index\r\n\r\n```\r\nPUT .ds-logs-synth.3-default-2024.10.10-000002/_settings\r\n{\r\n \"mapping.total_fields.limit\": 37\r\n}\r\n\r\nPUT .ds-logs-nginx.access-default-2024.10.10-000002/_settings\r\n{\r\n \"mapping.total_fields.limit\": 53\r\n}\r\n```\r\n\r\n9. Run the same Synthtrace scenario again.\r\n\r\nThis setup will give you 3 fields for testings\r\n\r\n1. cloud.availability_zone - Which will show the character limit isue\r\n2. cloud.project - Which will show an obsolete error which happened in\r\nthe past and now does not exists due to field limit\r\n3. cloud.project.id - A current field limit issue\r\n\r\n---------\r\n\r\nCo-authored-by: Marco Antonio Ghiani <[email protected]>\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"3ece9501560ae18bb6c5993db7cc889a6675857c","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["v9.0.0","release_note:feature","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-logs","Feature:Dataset Health"],"number":195561,"url":"https://github.com/elastic/kibana/pull/195561","mergeCommit":{"message":"[Dataset Quality] Add fix it flow for field limit (#195561)\n\n## Summary\r\n\r\nCloses - https://github.com/elastic/kibana/issues/190330\r\n\r\nThis PR implements the logic to support \r\n\r\n- One click increasing of Field Limit for Field Limit Issues (applicable\r\non for Integrations). For Non Integrations, only text is displayed as to\r\nhow they can do it.\r\n- The One click increase updates the linked custom component template as\r\nwell as the last backing Index\r\n- If Last Backing Index update fails due to any reason, it provides user\r\nan option to trigger a Rollover manually.\r\n\r\n## Demo\r\n\r\nNot possible, to many things to display 😆 \r\n\r\n## What's Pending ?\r\n\r\nTests\r\n\r\n- [x] API tests\r\n - [x] Settings API\r\n - [x] Rollover API\r\n - [x] Apply New limit API\r\n- [x] FTR tests\r\n- [x] Displaying of various issues for integrations and non integrations\r\n - [x] Fix it Flow Good case, without Rollover\r\n - [x] Fix it Flow Good case, with Rollover\r\n- [x] Manual Mitigation - Click on Component Template shold navigate to\r\nproper logic based on Integration / Non\r\n - [x] Manual Mitigation - Ingest Pipeline\r\n - [x] Link for official Documentation\r\n \r\n ## How to setup a local environment\r\n \r\nWe will be setting up 2 different data streams, one with integration and\r\none without. Please follow the steps in the exact order\r\n \r\n1. Start Local ES and Local Kibana\r\n2. Install Nginx Integration 1st\r\n3. Ingest data as per script here -\r\nhttps://gist.github.com/achyutjhunjhunwala/03ea29190c6594544f584d2f0efa71e5\r\n4. Set the Limit for the 2 datasets\r\n\r\n```\r\nPUT logs-synth.3-default/_settings\r\n{\r\n \"mapping.total_fields.limit\": 36\r\n}\r\n\r\n// Set the limit for Nginx\r\nPUT logs-nginx.access-default/_settings\r\n{\r\n \"mapping.total_fields.limit\": 52\r\n}\r\n```\r\n\r\n5. Now uncomment line number 59 from the synthtrace script to enable\r\ncloud.project.id field and run the scenario again\r\n6. Do a Rollover\r\n\r\n```\r\nPOST logs-synth.3-default/_rollover\r\nPOST logs-nginx.access-default/_rollover\r\n```\r\n\r\n7. Get last backing index for both dataset\r\n\r\n```\r\nGET _data_stream/logs-synth.3-default/\r\nGET _data_stream/logs-nginx.access-default\r\n```\r\n\r\n8. Increase the Limit by 1 but for last backing index\r\n\r\n```\r\nPUT .ds-logs-synth.3-default-2024.10.10-000002/_settings\r\n{\r\n \"mapping.total_fields.limit\": 37\r\n}\r\n\r\nPUT .ds-logs-nginx.access-default-2024.10.10-000002/_settings\r\n{\r\n \"mapping.total_fields.limit\": 53\r\n}\r\n```\r\n\r\n9. Run the same Synthtrace scenario again.\r\n\r\nThis setup will give you 3 fields for testings\r\n\r\n1. cloud.availability_zone - Which will show the character limit isue\r\n2. cloud.project - Which will show an obsolete error which happened in\r\nthe past and now does not exists due to field limit\r\n3. cloud.project.id - A current field limit issue\r\n\r\n---------\r\n\r\nCo-authored-by: Marco Antonio Ghiani <[email protected]>\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"3ece9501560ae18bb6c5993db7cc889a6675857c"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195561","number":195561,"mergeCommit":{"message":"[Dataset Quality] Add fix it flow for field limit (#195561)\n\n## Summary\r\n\r\nCloses - https://github.com/elastic/kibana/issues/190330\r\n\r\nThis PR implements the logic to support \r\n\r\n- One click increasing of Field Limit for Field Limit Issues (applicable\r\non for Integrations). For Non Integrations, only text is displayed as to\r\nhow they can do it.\r\n- The One click increase updates the linked custom component template as\r\nwell as the last backing Index\r\n- If Last Backing Index update fails due to any reason, it provides user\r\nan option to trigger a Rollover manually.\r\n\r\n## Demo\r\n\r\nNot possible, to many things to display 😆 \r\n\r\n## What's Pending ?\r\n\r\nTests\r\n\r\n- [x] API tests\r\n - [x] Settings API\r\n - [x] Rollover API\r\n - [x] Apply New limit API\r\n- [x] FTR tests\r\n- [x] Displaying of various issues for integrations and non integrations\r\n - [x] Fix it Flow Good case, without Rollover\r\n - [x] Fix it Flow Good case, with Rollover\r\n- [x] Manual Mitigation - Click on Component Template shold navigate to\r\nproper logic based on Integration / Non\r\n - [x] Manual Mitigation - Ingest Pipeline\r\n - [x] Link for official Documentation\r\n \r\n ## How to setup a local environment\r\n \r\nWe will be setting up 2 different data streams, one with integration and\r\none without. Please follow the steps in the exact order\r\n \r\n1. Start Local ES and Local Kibana\r\n2. Install Nginx Integration 1st\r\n3. Ingest data as per script here -\r\nhttps://gist.github.com/achyutjhunjhunwala/03ea29190c6594544f584d2f0efa71e5\r\n4. Set the Limit for the 2 datasets\r\n\r\n```\r\nPUT logs-synth.3-default/_settings\r\n{\r\n \"mapping.total_fields.limit\": 36\r\n}\r\n\r\n// Set the limit for Nginx\r\nPUT logs-nginx.access-default/_settings\r\n{\r\n \"mapping.total_fields.limit\": 52\r\n}\r\n```\r\n\r\n5. Now uncomment line number 59 from the synthtrace script to enable\r\ncloud.project.id field and run the scenario again\r\n6. Do a Rollover\r\n\r\n```\r\nPOST logs-synth.3-default/_rollover\r\nPOST logs-nginx.access-default/_rollover\r\n```\r\n\r\n7. Get last backing index for both dataset\r\n\r\n```\r\nGET _data_stream/logs-synth.3-default/\r\nGET _data_stream/logs-nginx.access-default\r\n```\r\n\r\n8. Increase the Limit by 1 but for last backing index\r\n\r\n```\r\nPUT .ds-logs-synth.3-default-2024.10.10-000002/_settings\r\n{\r\n \"mapping.total_fields.limit\": 37\r\n}\r\n\r\nPUT .ds-logs-nginx.access-default-2024.10.10-000002/_settings\r\n{\r\n \"mapping.total_fields.limit\": 53\r\n}\r\n```\r\n\r\n9. Run the same Synthtrace scenario again.\r\n\r\nThis setup will give you 3 fields for testings\r\n\r\n1. cloud.availability_zone - Which will show the character limit isue\r\n2. cloud.project - Which will show an obsolete error which happened in\r\nthe past and now does not exists due to field limit\r\n3. cloud.project.id - A current field limit issue\r\n\r\n---------\r\n\r\nCo-authored-by: Marco Antonio Ghiani <[email protected]>\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"3ece9501560ae18bb6c5993db7cc889a6675857c"}}]}] BACKPORT-->
- Loading branch information