Graylog2 / Graylog2/graylog2-server
Messages count in alert notification template
- Dominant language
- Java
- Stars
- 8.1k
- Forks
- 1.1k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 217
Description
Add a possibility to access more variables in alert notification template (both for title and body). In particular I want to access the number of messages in Message Count Alert Condition or aggregation value in Field Aggregation Alert Condition. Of course I'm talking about Email Alert Callback but if it's easy to implement I would appreciate this functionality in other callbacks (including plugins but I get that it might be a matter of doing it separately in those plugins). There also might be a need to update a documentation regarding this topic because there are variables used in default template which are not included in doc. There are also some variables that are available but also not described in doc. As a reference please look at this:
https://www.reddit.com/r/graylog/comments/31cxal/anybody_have_a_list_of_variables_that_can_be_used/crn0rfy
and the doc:
http://docs.graylog.org/en/2.4/pages/streams/alerts.html?highlight=check_result.resultDescription
## Expected Behavior
I want to be able to use a variable, eg. `${check_result.resultValue}` which will indicate messages number or aggregation value based on condition type.
## Current Behavior
Currently this value is only accessible in `${check_result.resultDescription}` variable. JMTE doesn't have any functionality to parse strings (and it won't have it, which is obvious) so messages count is not accessible by itself.
## Context
I have a business requirement to send meaningful alerts to non-technical people, preferably translated to polish. One of the requirements is to mark how critical the alert is and second is to show how much the threshold was exceeded. Doing the whole translation functionality on graylog side would be a total overkill. But if there is a possibility to access the message number that would be easy for me to do it by myself in my graylog instance. I already figured out how to access threshold, grace and threshold_type but as far as I see I can't access the number of messages which is the last part of the puzzle. Then I'll create a translation using "brutal" force of `if`s in the JMTE.
* Graylog Version: 2.4.3
* Elasticsearch Version: 5.6.8
* MongoDB Version: 2.4.10
* Operating System: Debian 8.7
Contributor guide
Assessment
This issue has not been assessed yet.