Lightweight and extensible program monitoring for node