您能否组合多值字段以形成整合的 Splunk 警报?

Can you combine multivalue fields to form a consolidated Splunk alert?

我有一个 Splunk 搜索,其中 returns 同一异常的多个日志,每个 ID 号一个(来自批处理)。我可以毫无问题地使用 reg-ex 从日志中提取字段,并且可以轻松地为每个 ID 号构建一个警报。

Slack Message: "Reference number $result.extractedField$ has failed processing."

由于错误是分批发生的,因此为每个失败的参考 ID 发送警报会很快使我的 Slack 频道变得混乱。是否可以收集所有提取的字段并将警报设置为仅发送一条消息?像这样...

Slack Message: "Reference numbers $result.listOfExtractedFields$ have failed to process." 

要获得合并提醒,您需要合并搜索结果。这样做:

index=the_index_youre_searching "the class where the error occurs" "the exception you're looking for" 
| stats values(*) as * by referenceID

务必select警报设置中的"Once"触发条件。