A Framework for Monitoring Transition Systems