Reputation: 6050
I'm not entirely sure where to start. Someone told me I could have Jenkins monitor one of our web services and that if it detects the service is down, to have Jenkins send an email alerting us.
I created a "Monitor an external job" job in Jenkins. I setup the remote server to send the output of the monitoring script to this job name in Jenkins. We can see the results on the screen when it runs. The problem is, "Monitor external job" doesn't have the nice options that Freestyle job has, meaning, it doesn't let me select Email notification or what not for me to setup to send an email if the service is down.
Can anyone point me in the right direction? How do I get Jenkins to check the output of a remote job and send an email if it fails? Am I even going about this the right way? Is creating a "Monitor an external job" the correct way to solve this problem? What plugins, other than the email-ext plugin is required to do this job? Thanks in advance for your help.
Upvotes: 1
Views: 858
Reputation: 68
I'm using http://wiki.jenkins-ci.org/display/JENKINS/HTTP+Request+Plugin to monitor whether some websites are up or down. You can set it to 'Fail the build' and set up a 'Post-build Action' 'Email Notification'.
Another option could be to setup an 'Execute shell' Build step, and curl a request to your web service, and check the response.
Upvotes: 2