一、kibana告警郵件設置
二、mustache語法
1. 引用變量
{{&ctx.results.0.hits.total}}
2. 取數組的值
{{&ctx.results.0.hits.total}}
3. for循環
{{#ctx.results.0.hits.hits}}
三、使用樣例
1. 從kibana日誌中檢索某關鍵詞,並返回所有符合條件的message
出現次數:{{&ctx.results.0.hits.total}}
message如下:
{{#ctx.results.0.hits.hits}}
{{_source.s_message}}
{{/ctx.results.0.hits.hits}}