"Once" means it will trigger one alert once the threshold (1 or more results by default) is reached .
"Each result" means you get an alert for each result. Often this is used to feed each result through to a python script for additional work.
You may also prefer to receive all events in separate emails for other automation purposes.
For example... if your search identifies 5 servers are down... you may prefer to have emails with specific subjects & bodies related to each server. This way you know your SQL cluster dropped 5 out of 10 servers, and they were these specific 5 servers just by glancing at the subjects of your emails. Otherwise, you'd just get the 5 attached as csv, or inline, etc. and have to open the email. etc.
in case of filtering through to a script, your script might rely on very specific results or not be able to handle an array of results, etc.
jkat..Thanks for your reply.. Could you hint out for the following scenario?
Am having lookup which lists all the servers in our environment (say SH,IN,DS..) and deploying a query to check for its internal logs. If internal logs not received for a server we assume Splunk is down. In that case for last 60 min.. the query check for internal logs. Its not there for two components say SH1,SH2 ( all my SH goes down). So in my result it returns both SH1 IP and SH2 IP. If I select "Once" the alert will trigger only once.
If I Select "For each Result" - How it will trigger?
the same alert will trigger twice with both IPs or two alerts with each IP?
it should send two emails, each with the same results. GIve it a shot, it all depends on your alert_actions.conf and version of splunk. Unfortunately I dont know how every version will behave...
Assume you want your alert to send an email: