...
The easiest way to this configuration is to administratively shutdown a BGP peer. After the next NMIS collect cycle a BGP Peer Down alert will be processed by opEvents. Here's an example from our lab.
Notice the Actions section that notifying us that our scripts fired. Scrolling down we can view the script output; it's not embedded into the event.