So, if you want to use one or a few specific fields, add a table command with the needed parameters, at the end of your search:
my_search_cmd | table src, host, rhost
The result file will contain:
host,rhost,src,"mv_host","mv_rhost","__mv_src"
myhostname1,"1.2.3.4",myhostname2,,,
Then use the following script in the alert:
http://mdessus.free.fr/Divers/splunk_alert.pl
And take care of any " that my be passed by the alert to the script unescaped.
... View more