-
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
[Alerts Plugin] Resolved action messages are buggy when editing; context variables don't work #83685
Comments
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
Did you happen to check the alert to see if the change got set in the action params? Perhaps this is just a UI issue?
How did you do the first edit? In-app? I guess I thought your first edit ^^^ was also in alerts management ...
This came up when we did the work - the problem is, we don't have any context in this case, we're basically determining that "last time this alert scheduled actions for this instance, this time it didn't". The only context variables we could provide would be the values from the previous run. Which seems either wrong or confusing or both :-). And we are not currently storing these anywhere, making it even harder :-) There are still variables available, so in theory you could construct a message using the alert params, eg; just not the kibana/x-pack/plugins/alerts/server/task_runner/transform_action_params.ts Lines 45 to 54 in 3651748
Worth opening an issue on this, I'm sure it will come up again, maybe there's an angle on this that I'm missing ... actually, I'm realizing that we have a context variable in the index threshold alert (currently named
So that sounds like a UI issue ... and just verified that I'm seeing the same.
No action type will get |
Looks like it was indeed set in the action params in the request sent to the
Might be able to do that, though for Metrics alerts we do have the verbose
(and we can't get the current value from the alert params) I'm actually noticing in my tests that context variables will sometimes work on Resolved actions, and then sometimes they won't. Not sure why. |
That "reason" looks pretty close to what we have in index threshold context variables as "function" now, but will be "conditions" soon-ish (before 7.11 FF hopefully). I think that now that there's two of these things, it warrants considering to make it a top-level variable that the alert executor would provide somehow. If we continue with "no context variables are available during resolve", then that's why it would be "top-level" (peer of |
Actually, now that I think about it, this doesn't need to be in the alert executor, because the idea is that it's a human-readable representation of the alert params, so it could be some thing on the alert itself, not associated with the executor. Could be useful to have this displayed somewhere in the UI as the alert is being edited, or expando section in alert/instances lists or something. |
Looks like there's two separate issues here:
To solve the context variables, we may need to expand In the example above, you could drop the second part and built the rest from the params (ex: @pmuellr should we break down #66095 or create a separate issue if we go the message by group path? |
There are definitely multiple issues here:
I think we should scope this issue to the first one - the UI issue, since we have to, and know how to fix that, and don't yet know what the answers to the others are. I don't |
When I create an alert and change the default message from "Resolved" to something else, the change doesn't work. My alerts will only ever send "Resolved."
When I edit the alert from the Alerts Management screen and try to change the message again, it does change what the server logs out, but:
Only tested this with the Server Log action type; unsure if it affects others.
The text was updated successfully, but these errors were encountered: