alerts: add support for event-based conditions and pusthing events to server
alerts: added alert tests based on event condition