I think it would be easier to either write a specific alert notification sender plugin for this purpose, or e.g. use the CLI-Scripts for this purpose.
I think the operations do not receive the full data of the alert, so can't really pass that to your script.
If I go the CLI-Scripts route, my script needs to be Java Script or can I pass alert information as arguments to a ksh or perl script somehow?
I started a script sender plugin some time ago, that would also allow for Ruby (and with some extension other languages where a JSR 223 binding exits), but that never worked really well because of classloading issues. Would be cool to follow this route, but right now, this is pretty low in the task stack.
It should not be too hard though to write a shell sender plugin that just passes the alert information via command line arguments or similar. If someone wants to help out, please ping us.
But +1 on a generic "execute external program" alert sender.