Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.x] [ECO][Inventory v2] Ad hoc data view: Add get entities definiti…
…on endpoint using sources (#204026) (#206610) # Backport This will backport the following commits from `main` to `8.x`: - [[ECO][Inventory v2] Ad hoc data view: Add get entities definition endpoint using sources (#204026)](#204026) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"jennypavlova","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-14T15:30:39Z","message":"[ECO][Inventory v2] Ad hoc data view: Add get entities definition endpoint using sources (#204026)\n\nCloses #202298 \r\n\r\nThis PR changes the way we get the entity index patterns to v2. It\r\ncreates an endpoint part of the inventory API which returns the index\r\npatterns by entity type.\r\n\r\n## Testing\r\n\r\n### Test the endpoint: \r\n- Open Dev tools and add\r\n` GET kbn:/internal/inventory/entity/definitions/sources`\r\n- Response: \r\n\r\n\r\n![image](https://github.com/user-attachments/assets/3346c36e-dbc2-4e56-9ed6-d3d3a8f7d1a5)\r\n\r\n\r\n### Test in the UI\r\n- After the previous steps add some host data (oblt cluster /\r\nmetricbeat) or use synthtrace (for example use `node scripts/synthtrace\r\ninfra_hosts_with_apm_hosts --scenarioOpts.numInstances=10` or `node\r\nscripts/synthtrace logs_traces_hosts.ts`)\r\n- Go to Inventory and expand the host group\r\n- Click on the actions button for any host and click on the Discover\r\nlink\r\n- The correct dataview should be selected based on the index patterns in\r\nthe source definition\r\nThe same can be done for other entity types\r\n- Test the search bar as well (the suggestions should be visible) and\r\nnow we should have 1 request to get the sources (instead of doing it on\r\nclick)\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/93b5ac6c-9d64-44e0-b26e-6133477e0840\r\n\r\n\r\n\r\n\r\n<!--ONMERGE {\"backportTargets\":[\"8.x\"]} ONMERGE-->\r\n\r\n---------\r\n\r\nCo-authored-by: Carlos Crespo <[email protected]>\r\nCo-authored-by: Sergi Romeu <[email protected]>\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"ffccfdc62cd1da5baf54568cbee20a9a3466178e","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-infra_services"],"title":"[ECO][Inventory v2] Ad hoc data view: Add get entities definition endpoint using sources","number":204026,"url":"https://github.com/elastic/kibana/pull/204026","mergeCommit":{"message":"[ECO][Inventory v2] Ad hoc data view: Add get entities definition endpoint using sources (#204026)\n\nCloses #202298 \r\n\r\nThis PR changes the way we get the entity index patterns to v2. It\r\ncreates an endpoint part of the inventory API which returns the index\r\npatterns by entity type.\r\n\r\n## Testing\r\n\r\n### Test the endpoint: \r\n- Open Dev tools and add\r\n` GET kbn:/internal/inventory/entity/definitions/sources`\r\n- Response: \r\n\r\n\r\n![image](https://github.com/user-attachments/assets/3346c36e-dbc2-4e56-9ed6-d3d3a8f7d1a5)\r\n\r\n\r\n### Test in the UI\r\n- After the previous steps add some host data (oblt cluster /\r\nmetricbeat) or use synthtrace (for example use `node scripts/synthtrace\r\ninfra_hosts_with_apm_hosts --scenarioOpts.numInstances=10` or `node\r\nscripts/synthtrace logs_traces_hosts.ts`)\r\n- Go to Inventory and expand the host group\r\n- Click on the actions button for any host and click on the Discover\r\nlink\r\n- The correct dataview should be selected based on the index patterns in\r\nthe source definition\r\nThe same can be done for other entity types\r\n- Test the search bar as well (the suggestions should be visible) and\r\nnow we should have 1 request to get the sources (instead of doing it on\r\nclick)\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/93b5ac6c-9d64-44e0-b26e-6133477e0840\r\n\r\n\r\n\r\n\r\n<!--ONMERGE {\"backportTargets\":[\"8.x\"]} ONMERGE-->\r\n\r\n---------\r\n\r\nCo-authored-by: Carlos Crespo <[email protected]>\r\nCo-authored-by: Sergi Romeu <[email protected]>\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"ffccfdc62cd1da5baf54568cbee20a9a3466178e"}},"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/204026","number":204026,"mergeCommit":{"message":"[ECO][Inventory v2] Ad hoc data view: Add get entities definition endpoint using sources (#204026)\n\nCloses #202298 \r\n\r\nThis PR changes the way we get the entity index patterns to v2. It\r\ncreates an endpoint part of the inventory API which returns the index\r\npatterns by entity type.\r\n\r\n## Testing\r\n\r\n### Test the endpoint: \r\n- Open Dev tools and add\r\n` GET kbn:/internal/inventory/entity/definitions/sources`\r\n- Response: \r\n\r\n\r\n![image](https://github.com/user-attachments/assets/3346c36e-dbc2-4e56-9ed6-d3d3a8f7d1a5)\r\n\r\n\r\n### Test in the UI\r\n- After the previous steps add some host data (oblt cluster /\r\nmetricbeat) or use synthtrace (for example use `node scripts/synthtrace\r\ninfra_hosts_with_apm_hosts --scenarioOpts.numInstances=10` or `node\r\nscripts/synthtrace logs_traces_hosts.ts`)\r\n- Go to Inventory and expand the host group\r\n- Click on the actions button for any host and click on the Discover\r\nlink\r\n- The correct dataview should be selected based on the index patterns in\r\nthe source definition\r\nThe same can be done for other entity types\r\n- Test the search bar as well (the suggestions should be visible) and\r\nnow we should have 1 request to get the sources (instead of doing it on\r\nclick)\r\n\r\n\r\n\r\nhttps://github.com/user-attachments/assets/93b5ac6c-9d64-44e0-b26e-6133477e0840\r\n\r\n\r\n\r\n\r\n<!--ONMERGE {\"backportTargets\":[\"8.x\"]} ONMERGE-->\r\n\r\n---------\r\n\r\nCo-authored-by: Carlos Crespo <[email protected]>\r\nCo-authored-by: Sergi Romeu <[email protected]>\r\nCo-authored-by: kibanamachine <[email protected]>","sha":"ffccfdc62cd1da5baf54568cbee20a9a3466178e"}}]}] BACKPORT--> Co-authored-by: jennypavlova <[email protected]>
- Loading branch information