-
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
Ability to specify custom id for alerts and actions #50210
Comments
Pinging @elastic/kibana-stack-services (Team:Stack Services) |
@mikecote @FrankHassanabad it looks like this might be possible today, provided you use the alert client? It wouldn't be possible via the API, but looking at the client, you can pass kibana/x-pack/legacy/plugins/alerting/server/alerts_client.ts Lines 131 to 134 in ce99844
And it looks like the options will allow you to override the ID: kibana/src/core/server/saved_objects/service/saved_objects_client.ts Lines 36 to 46 in ce99844
|
In theory, yes as you can bypass the TypeScript type checks and it would pass along. The one place that will stop you from doing so is here: https://github.com/elastic/kibana/blob/master/x-pack/plugins/encrypted_saved_objects/server/saved_objects/encrypted_saved_objects_client_wrapper.ts#L58-L60. On the good side, we're not too far from supporting custom ids as we would just need to revive this PR: #42762. |
A PR merged in the ESO plugin to enable us to do this enhancement. |
I believe that should be fine @mikecote. We currently use |
@spong, actually, I think UUID v4 will work as well. It validates ok here: https://github.com/elastic/kibana/blob/master/src/core/server/saved_objects/service/lib/utils.ts#L78. But it's good to know UUIDs work for you 👍 I wanted to make sure your requirement didn't need to work with string / readable names. |
In certain cases like system generated alerts, you want to
One suggested approach to doing this is to be able to assign custom IDs to alerts that would be the same in any installation, and prevent duplicates if running an alert setup multiple times.
The text was updated successfully, but these errors were encountered: