Adjusted monitoring script to call process rules