Closed jidckii closed 5 years ago
I've added some code for the first draft inside a feature branch. It works as expected. You can use variables inside custom annotations and labels like this: "mystreamtitle=${stream.title};myresultdesc=${check_result.resultDescription};mytriggeredat=${check_result.triggeredAt};mystreamid=${stream.id};mystreamdescription=${stream.description};myalertconditiontitle=${alertCondition.title};myalertconditiondesc=${alertCondition.description};mytriggeredcondition=${check_result.triggeredCondition};"
.
I'll add some more tests tomorrow to ensure that using the template engine will not cause side effects.
Can we also get ${message.message}
on which the alert was triggered as variable?
Can we also get
${message.message}
on which the alert was triggered as variable?
Well, this should be possible as in the E-Mail-Callback.
When you use this as value:
${foreach backlog message}${message} ${end}
it should append all messages matching your condition to a maximum you have defined.
So when you only have one matching message there should only be one written to your annotation.
Thanks!
@StefanHufschmidt
Hey. Is this functionality not yet added to any release?
@jidckii sorry for the delay, I think @jlnshr will take a look at it now and it should be released within the next hours.
Merged into master, released with version 1.2
Add for custom annotations and labels variables, as in this example email: http://docs.graylog.org/en/2.5/pages/streams/alerts.html#email-alert-notification Now this don't work. https://i.imgur.com/9BslOJn.png https://i.imgur.com/IjzCELz.png