Skip to content
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

Allow action config to set default param values #50255

Open
mikecote opened this issue Nov 12, 2019 · 11 comments
Open

Allow action config to set default param values #50255

mikecote opened this issue Nov 12, 2019 · 11 comments
Labels
estimate:medium Medium Estimated Level of Effort Feature:Actions/ConnectorsManagement Issues related to Connectors Management UX Feature:Actions NeededFor:Uptime Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) UX

Comments

@mikecote
Copy link
Contributor

eg email action that pre-fills the to field

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-stack-services (Team:Stack Services)

@bmcconaghy bmcconaghy added Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) and removed Team:Stack Services labels Dec 12, 2019
@dsztykman
Copy link

Orange customer is also asking for pre-fills webhook so all their message have the same template.

@ymao1 ymao1 changed the title Allow action config to set param things Allow action config to set default param values Mar 18, 2021
@ymao1
Copy link
Contributor

ymao1 commented Mar 18, 2021

Closing as won't do.

@ymao1 ymao1 closed this as completed Mar 18, 2021
@shahzad31
Copy link
Contributor

We need this for uptime status alert, we have received multiple complaints from users since they can't set email as default connector for uptime one click toggle alerts in uptime settings.

I think we should allow users to set default with option of overriding it when user is creating alert.

@shahzad31 shahzad31 reopened this Apr 19, 2021
@gmmorris
Copy link
Contributor

We need this for uptime status alert, we have received multiple complaints from users since they can't set email as default connector for uptime one click toggle alerts in uptime settings.

I think we should allow users to set default with option of overriding it when user is creating alert.

To add some context:
Uptime are doing something we haven't seen before, which is they provide a "one click creation" of rules.
They do this by embedding the Create Connector flyout in their UI, and then attach actions to their rules using hard coded default params.
At the moment they can't do this with Email because they need some kind of user interaction where a user provides a default To value.

What @shahzad31 is asking for is not only the ability for the user to add a default value for the To field, but the ability to apply this default value programatically when programmatically attaching an Action to a Rule. I'm not sure how best to deliver this... we could provide some kind of getter that returns the default params, but I'd much rather we encapsulate that and attach these defaults to an action when it is missing these values. The complexity is that we still need to validate we have these params are there when the Rule is created. 🤔

@gmmorris
Copy link
Contributor

Returned to Triage....

@mikecote
Copy link
Contributor Author

What @shahzad31 is asking for is not only the ability for the user to add a default value for the To field, but the ability to apply this default value programatically when programmatically attaching an Action to a Rule. I'm not sure how best to deliver this... we could provide some kind of getter that returns the default params, but I'd much rather we encapsulate that and attach these defaults to an action when it is missing these values. The complexity is that we still need to validate we have these params are there when the Rule is created. 🤔

Since this is the first request for such capability, can a custom API be built into Uptime to handle this logic? It feels too soon to provide a generalized approach for this capability until we have a few use cases. It would also unblock them on such capability instead of waiting for a while.

@pmuellr
Copy link
Member

pmuellr commented Apr 20, 2021

Adding a to to the email config (and presumably still available in params as well) is noted in this issue: #50651

There's also a notion of "parameter templates" - #95049

For that one, you could imagine a customer picks an email connector, and then an email template to use with it. Presumably a solution could create/manage their own template, and use it under the covers when creating the alert. Perhaps there are default templates per rule per space.

not only the ability for the user to add a default value for the To field, but the ability to apply this default value programatically when programmatically attaching an Action to a Rule.

The complexity is that we still need to validate we have these params are there when the Rule is created.

Not sure I completely understand the context here. Example? I totally get that depending on how dynamic these values are, including being set or not, you could end up at execution time with required params not having values, or having invalid values that no longer validate. Maintaining consistency could be expensive ... is that what you mean?

@gmmorris
Copy link
Contributor

Not sure I completely understand the context here. Example? I totally get that depending on how dynamic these values are, including being set or not, you could end up at execution time with required params not having values, or having invalid values that no longer validate. Maintaining consistency could be expensive ... is that what you mean?

All I mean is that, in the same way that you can't create a rule in the UI without the value being there, you shouldn't be able to create a rule programatically without all values being specified.
But as there is no UI involved when uptime create the rule, we need a way of applying these default values that isn't UI based (by autofilling the field before a user hits save)

@gmmorris
Copy link
Contributor

gmmorris commented Apr 20, 2021

What @shahzad31 is asking for is not only the ability for the user to add a default value for the To field, but the ability to apply this default value programatically when programmatically attaching an Action to a Rule. I'm not sure how best to deliver this... we could provide some kind of getter that returns the default params, but I'd much rather we encapsulate that and attach these defaults to an action when it is missing these values. The complexity is that we still need to validate we have these params are there when the Rule is created. 🤔

Since this is the first request for such capability, can a custom API be built into Uptime to handle this logic? It feels too soon to provide a generalized approach for this capability until we have a few use cases. It would also unblock them on such capability instead of waiting for a while.

Yeah, there's something to that.
I actually suggested to @shahzad31 that they could take advantage of the fact that action param React components can be rendered wherever they want (much like the "Test Connector" tab), and they could actually allows the Uptime users to specify the default params and store them in SOs in Uptime.

I personally think that would give users a relatively nice UX 🤷 but I leave that to O11y PMs to decide.

@pmuellr
Copy link
Member

pmuellr commented Apr 20, 2021

Ya, agree that we should try to do this in Uptime as Gidi/Mike suggest - maybe it's possible, or would require just a few fixes to make it work. Or maybe we'll find out something more complex is required. And perhaps we can use this to come up with a simpler way for solutions to enable this - by having something like an internal-only kind of templating facility that solutions could plug into.

@gmmorris gmmorris added the loe:large Large Level of Effort label Jul 15, 2021
@gmmorris gmmorris added DX Issues related to Developer Experience UX estimate:medium Medium Estimated Level of Effort and removed DX Issues related to Developer Experience labels Aug 13, 2021
@gmmorris gmmorris removed the loe:large Large Level of Effort label Sep 2, 2021
@kobelb kobelb added the needs-team Issues missing a team label label Jan 31, 2022
@botelastic botelastic bot removed the needs-team Issues missing a team label label Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
estimate:medium Medium Estimated Level of Effort Feature:Actions/ConnectorsManagement Issues related to Connectors Management UX Feature:Actions NeededFor:Uptime Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) UX
Projects
No open projects
Development

No branches or pull requests

9 participants