您可以将多价字段结合起来形成一个合并的Splunk警报吗?



我有一个splunk搜索,该搜索返回了相同例外的几个日志,每个ID编号一个(来自批处理过程(。我没有问题从reg-ex中从日志中提取字段,并且可以轻松地为每个ID编号构建一个警报。

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

由于该错误在批处理中发生,因此为每个引用ID发送一个警报,而失败的每个参考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

请确保在警报设置中选择"一次"触发条件。

最新更新