-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Entity Analytics][Privmon] Only create Privileged user monitoring default index source if it doesn't already exist (update otherwise) #229693
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
Conversation
|
Pinging @elastic/security-entity-analytics (Team:Entity Analytics) |
…into maybe-create-mds
💚 Build Succeeded
Metrics [docs]
History
cc @hop-dev |
CAWilson94
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this, looking good! 🚀
|
@elasticmachine merge upstream |
|
Starting backport for target branches: 9.1 https://github.com/elastic/kibana/actions/runs/16747432189 |
…esn't already exist (update otherwise) (elastic#229693) ## Summary I noticed on calling the init API multiple times we get the error: ``` proc [kibana] Unhandled Promise rejection detected: proc [kibana] proc [kibana] Error: A monitoring entity source with the name "default-monitoring-index-default" already exists. proc [kibana] at MonitoringEntitySourceDescriptorClient.assertNameUniqueness (monitoring_entity_source.ts:103:15) proc [kibana] at processTicksAndRejections (node:internal/process/task_queues:105:5) proc [kibana] at MonitoringEntitySourceDescriptorClient.create (monitoring_entity_source.ts:24:5) proc [kibana] ``` I have changed it so that if it already exists we update it, this way we get the chance to repair it if anything has gone wrong. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> (cherry picked from commit 6869eb1)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
… it doesn't already exist (update otherwise) (#229693) (#230532) # Backport This will backport the following commits from `main` to `9.1`: - [[Entity Analytics][Privmon] Only create default index source if it doesn't already exist (update otherwise) (#229693)](#229693) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Mark Hopkin","email":"mark.hopkin@elastic.co"},"sourceCommit":{"committedDate":"2025-08-05T10:25:07Z","message":"[Entity Analytics][Privmon] Only create default index source if it doesn't already exist (update otherwise) (#229693)\n\n## Summary\n\nI noticed on calling the init API multiple times we get the error:\n\n```\n proc [kibana] Unhandled Promise rejection detected:\n proc [kibana] \n proc [kibana] Error: A monitoring entity source with the name \"default-monitoring-index-default\" already exists.\n proc [kibana] at MonitoringEntitySourceDescriptorClient.assertNameUniqueness (monitoring_entity_source.ts:103:15)\n proc [kibana] at processTicksAndRejections (node:internal/process/task_queues:105:5)\n proc [kibana] at MonitoringEntitySourceDescriptorClient.create (monitoring_entity_source.ts:24:5)\n proc [kibana] \n ```\n\nI have changed it so that if it already exists we update it, this way we get the chance to repair it if anything has gone wrong.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"6869eb1a64c6365cea08830e1f74b5340b521897","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Entity Analytics","backport:version","v9.1.0","v9.2.0"],"title":"[Entity Analytics][Privmon] Only create default index source if it doesn't already exist (update otherwise)","number":229693,"url":"https://github.com/elastic/kibana/pull/229693","mergeCommit":{"message":"[Entity Analytics][Privmon] Only create default index source if it doesn't already exist (update otherwise) (#229693)\n\n## Summary\n\nI noticed on calling the init API multiple times we get the error:\n\n```\n proc [kibana] Unhandled Promise rejection detected:\n proc [kibana] \n proc [kibana] Error: A monitoring entity source with the name \"default-monitoring-index-default\" already exists.\n proc [kibana] at MonitoringEntitySourceDescriptorClient.assertNameUniqueness (monitoring_entity_source.ts:103:15)\n proc [kibana] at processTicksAndRejections (node:internal/process/task_queues:105:5)\n proc [kibana] at MonitoringEntitySourceDescriptorClient.create (monitoring_entity_source.ts:24:5)\n proc [kibana] \n ```\n\nI have changed it so that if it already exists we update it, this way we get the chance to repair it if anything has gone wrong.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"6869eb1a64c6365cea08830e1f74b5340b521897"}},"sourceBranch":"main","suggestedTargetBranches":["9.1"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/229693","number":229693,"mergeCommit":{"message":"[Entity Analytics][Privmon] Only create default index source if it doesn't already exist (update otherwise) (#229693)\n\n## Summary\n\nI noticed on calling the init API multiple times we get the error:\n\n```\n proc [kibana] Unhandled Promise rejection detected:\n proc [kibana] \n proc [kibana] Error: A monitoring entity source with the name \"default-monitoring-index-default\" already exists.\n proc [kibana] at MonitoringEntitySourceDescriptorClient.assertNameUniqueness (monitoring_entity_source.ts:103:15)\n proc [kibana] at processTicksAndRejections (node:internal/process/task_queues:105:5)\n proc [kibana] at MonitoringEntitySourceDescriptorClient.create (monitoring_entity_source.ts:24:5)\n proc [kibana] \n ```\n\nI have changed it so that if it already exists we update it, this way we get the chance to repair it if anything has gone wrong.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>","sha":"6869eb1a64c6365cea08830e1f74b5340b521897"}}]}] BACKPORT--> Co-authored-by: Mark Hopkin <mark.hopkin@elastic.co> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…esn't already exist (update otherwise) (elastic#229693) ## Summary I noticed on calling the init API multiple times we get the error: ``` proc [kibana] Unhandled Promise rejection detected: proc [kibana] proc [kibana] Error: A monitoring entity source with the name "default-monitoring-index-default" already exists. proc [kibana] at MonitoringEntitySourceDescriptorClient.assertNameUniqueness (monitoring_entity_source.ts:103:15) proc [kibana] at processTicksAndRejections (node:internal/process/task_queues:105:5) proc [kibana] at MonitoringEntitySourceDescriptorClient.create (monitoring_entity_source.ts:24:5) proc [kibana] ``` I have changed it so that if it already exists we update it, this way we get the chance to repair it if anything has gone wrong. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
…esn't already exist (update otherwise) (elastic#229693) ## Summary I noticed on calling the init API multiple times we get the error: ``` proc [kibana] Unhandled Promise rejection detected: proc [kibana] proc [kibana] Error: A monitoring entity source with the name "default-monitoring-index-default" already exists. proc [kibana] at MonitoringEntitySourceDescriptorClient.assertNameUniqueness (monitoring_entity_source.ts:103:15) proc [kibana] at processTicksAndRejections (node:internal/process/task_queues:105:5) proc [kibana] at MonitoringEntitySourceDescriptorClient.create (monitoring_entity_source.ts:24:5) proc [kibana] ``` I have changed it so that if it already exists we update it, this way we get the chance to repair it if anything has gone wrong. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Summary
I noticed on calling the init API multiple times we get the error:
I have changed it so that if it already exists we update it, this way we get the chance to repair it if anything has gone wrong.