code to monitor jenkins