Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.17] [Inventory] Inventory k8s entities fixes (elastic#201260) (ela…
…stic#201725) # Backport This will backport the following commits from `main` to `8.17`: - [[Inventory] Inventory k8s entities fixes (elastic#201260)](elastic#201260) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Carlos Crespo","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-26T08:29:23Z","message":"[Inventory] Inventory k8s entities fixes (elastic#201260)\n\ncloses [elastic#201226](https://github.com/elastic/kibana/issues/201226)\r\n\r\n## Summary\r\n\r\nThis PR makes the final adjustments on k8s entities after the\r\nhttps://github.com/elastic/pull/196916 was merged.\r\n\r\nI had to fix most of the ECS entities because they had their `entityId`\r\ndefined with `uid` field. Most of the ECS K8s entities don't have this\r\nfield and should use the `name` field instead (see\r\n[metricsets](https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-module-kubernetes.html#_metricsets_41))\r\n\r\n~I also had to fix the transforms to include an aggregation for the\r\n`displayNameTemplate` field, when it doesn't match with the `entity.Id`~\r\n\r\n### Real data Otel\r\n\r\nThe screenshots below are from a tests running the `opentemeletry-demo`\r\nsending otel data\r\n\r\n<img width=\"710\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/d223858d-3b99-4bb0-b69e-3b70112a2c17\">\r\n\r\n<img width=\"710\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/1ef27dcd-682c-4681-b92b-be9b4f2b32b8\">\r\n\r\n### Real data ECS\r\n\r\nThe screenshots below are from a tests running the `opentemeletry-demo`\r\nwith elastic agent installed with Kubernetes integration\r\n\r\n<img width=\"710\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/e2fb6cbd-60a0-4995-bc94-8ccbc8911db1\">\r\n<img width=\"710\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/a3d9dba3-fee7-42af-972b-34a151b52f2b\">\r\n\r\n\r\n### Additional test with synthtrace\r\n\r\n<img width=\"709\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/bf56da1e-0bbb-40a0-9f44-06b9f86427a8\">\r\n\r\n### Fix\r\n\r\nECS k8s service entity was missing the link to its corresponding\r\ndashboard\r\n\r\n<img width=\"709\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/488891a6-1c61-4001-b604-208478e1c798\">\r\n\r\n<img width=\"709\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/0b30c56b-db52-4d82-a7e7-100dae91a35e\">\r\n\r\n\r\n### How to test\r\n\r\n- Start local kibana and es instances\r\n- run ` node scripts/synthtrace k8s_entities.ts --clean --live`\r\n- Navigate to Inventory and enable EEM\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"aead7b9acd5de0e5668c5f860eda473071a5a42d","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","Team:obs-entities","backport:version","v8.17.0"],"title":"[Inventory] Inventory k8s entities fixes","number":201260,"url":"https://github.com/elastic/kibana/pull/201260","mergeCommit":{"message":"[Inventory] Inventory k8s entities fixes (elastic#201260)\n\ncloses [elastic#201226](https://github.com/elastic/kibana/issues/201226)\r\n\r\n## Summary\r\n\r\nThis PR makes the final adjustments on k8s entities after the\r\nhttps://github.com/elastic/pull/196916 was merged.\r\n\r\nI had to fix most of the ECS entities because they had their `entityId`\r\ndefined with `uid` field. Most of the ECS K8s entities don't have this\r\nfield and should use the `name` field instead (see\r\n[metricsets](https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-module-kubernetes.html#_metricsets_41))\r\n\r\n~I also had to fix the transforms to include an aggregation for the\r\n`displayNameTemplate` field, when it doesn't match with the `entity.Id`~\r\n\r\n### Real data Otel\r\n\r\nThe screenshots below are from a tests running the `opentemeletry-demo`\r\nsending otel data\r\n\r\n<img width=\"710\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/d223858d-3b99-4bb0-b69e-3b70112a2c17\">\r\n\r\n<img width=\"710\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/1ef27dcd-682c-4681-b92b-be9b4f2b32b8\">\r\n\r\n### Real data ECS\r\n\r\nThe screenshots below are from a tests running the `opentemeletry-demo`\r\nwith elastic agent installed with Kubernetes integration\r\n\r\n<img width=\"710\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/e2fb6cbd-60a0-4995-bc94-8ccbc8911db1\">\r\n<img width=\"710\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/a3d9dba3-fee7-42af-972b-34a151b52f2b\">\r\n\r\n\r\n### Additional test with synthtrace\r\n\r\n<img width=\"709\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/bf56da1e-0bbb-40a0-9f44-06b9f86427a8\">\r\n\r\n### Fix\r\n\r\nECS k8s service entity was missing the link to its corresponding\r\ndashboard\r\n\r\n<img width=\"709\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/488891a6-1c61-4001-b604-208478e1c798\">\r\n\r\n<img width=\"709\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/0b30c56b-db52-4d82-a7e7-100dae91a35e\">\r\n\r\n\r\n### How to test\r\n\r\n- Start local kibana and es instances\r\n- run ` node scripts/synthtrace k8s_entities.ts --clean --live`\r\n- Navigate to Inventory and enable EEM\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"aead7b9acd5de0e5668c5f860eda473071a5a42d"}},"sourceBranch":"main","suggestedTargetBranches":["8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/201260","number":201260,"mergeCommit":{"message":"[Inventory] Inventory k8s entities fixes (elastic#201260)\n\ncloses [elastic#201226](https://github.com/elastic/kibana/issues/201226)\r\n\r\n## Summary\r\n\r\nThis PR makes the final adjustments on k8s entities after the\r\nhttps://github.com/elastic/pull/196916 was merged.\r\n\r\nI had to fix most of the ECS entities because they had their `entityId`\r\ndefined with `uid` field. Most of the ECS K8s entities don't have this\r\nfield and should use the `name` field instead (see\r\n[metricsets](https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-module-kubernetes.html#_metricsets_41))\r\n\r\n~I also had to fix the transforms to include an aggregation for the\r\n`displayNameTemplate` field, when it doesn't match with the `entity.Id`~\r\n\r\n### Real data Otel\r\n\r\nThe screenshots below are from a tests running the `opentemeletry-demo`\r\nsending otel data\r\n\r\n<img width=\"710\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/d223858d-3b99-4bb0-b69e-3b70112a2c17\">\r\n\r\n<img width=\"710\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/1ef27dcd-682c-4681-b92b-be9b4f2b32b8\">\r\n\r\n### Real data ECS\r\n\r\nThe screenshots below are from a tests running the `opentemeletry-demo`\r\nwith elastic agent installed with Kubernetes integration\r\n\r\n<img width=\"710\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/e2fb6cbd-60a0-4995-bc94-8ccbc8911db1\">\r\n<img width=\"710\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/a3d9dba3-fee7-42af-972b-34a151b52f2b\">\r\n\r\n\r\n### Additional test with synthtrace\r\n\r\n<img width=\"709\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/bf56da1e-0bbb-40a0-9f44-06b9f86427a8\">\r\n\r\n### Fix\r\n\r\nECS k8s service entity was missing the link to its corresponding\r\ndashboard\r\n\r\n<img width=\"709\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/488891a6-1c61-4001-b604-208478e1c798\">\r\n\r\n<img width=\"709\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/0b30c56b-db52-4d82-a7e7-100dae91a35e\">\r\n\r\n\r\n### How to test\r\n\r\n- Start local kibana and es instances\r\n- run ` node scripts/synthtrace k8s_entities.ts --clean --live`\r\n- Navigate to Inventory and enable EEM\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"aead7b9acd5de0e5668c5f860eda473071a5a42d"}},{"branch":"8.17","label":"v8.17.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Carlos Crespo <[email protected]>
- Loading branch information