Hi,
I try to add some use full information to my alerts such as rule description and full log etc. But it does not show them in alert email. following is my query and "mustache message template". Appreciate team support on this
{
"size": 0,
"query": {
"bool": {
"filter": [
{
"range": {
"@timestamp": {
"from": "{{period_end}}||-1h",
"to": "{{period_end}}",
"include_lower": true,
"include_upper": true,
"format": "epoch_millis",
"boost": 1
}
}
},
{
"term": {
"
decoder.name": {
"value": "fortigate-firewall-v5",
"boost": 1
}
}
},
{
"term": {
"rule.description": {
"value": "Fortigate: Login failed.",
"boost": 1
}
}
}
],
"adjust_pure_negative": true,
"boost": 1
}
},
"aggregations": {
"terms_agg": {
"terms": {
"field": "data.msg",
"size": 10,
"min_doc_count": 1,
"shard_min_doc_count": 0,
"show_term_doc_count_error": false,
"order": [
{
"_count": "desc"
},
{
"_key": "asc"
}
]
}
}
}
}
Monitor {{
ctx.monitor.name}} just entered alert status. Please investigate the issue.
- Trigger: {{
ctx.trigger.name}}
- Severity: {{ctx.trigger.severity}}
- Period start: {{ctx.periodStart}}
- Period end: {{ctx.periodEnd}}
- Occurrences: {{ctx.results.0.hits.total.value}}
{{#ctx.results.0.hits.hits}}
- Rule: {{_source.rule.description}}
{{/ctx.results.0.hits.hits}}