Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

Sending conditional alerts based on previous search result

$
0
0
Following is the json log format being stored in Splunk. { data:[ { "endpoint":"ep_1", "service":"service_1", "http_status_code":"500" }, { "endpoint":"ep_2", "service":"service_1", "http_status_code":"500" }, { "endpoint":"ep_3", "service":"service_2", "http_status_code":"503" } ] } Currently, an alert is setup to check once every 5 mins with the following search query and send an email if results>0. host=something "data{}.http_status_code"= 5*| eval endpoint='data{}.endpoint' | Stats Count("data{}.http_status_code") as Count by endpoint | where Error_Count > 0 The generated result is : ![alt text][1] Now, the ask is, once an alert is generated (which contains a particular endpoin, say ep_1), in the next run, if the search result contains the same endpoint, it should NOT send an email for another hour. So in this case, when the search query runs after 5 mins and contains ep_1 in the result, it should not send an email. So effectively, I need a condition for this endpoint's occurrence in the previously executed search result. Is there a way this can be accomplished? Please help. [1]: /storage/temp/216823-216795-table1.png

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>