Events for alerts; dump all events

This hooks up event detection into the alerts testing, also adds dumping all received events in the html file.