So I wanted to setup Jenkins external monitoring on a web server I have on a Centos VM, and I found a combination of these three blog posts worked!
- http://kvdev.wordpress.com/2012/03/01/jenkins-monitoring-external-jobs/
- http://stackoverflow.com/questions/11830098/setup-jenkins-to-monitor-external-job
- https://gist.github.com/junaid18183/8450761
Firstly, run the following commands :``` wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo rpm –import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key yum -y install jenkins
* run the following:
cd /usr/lib/jenkins unzip /usr/lib/jenkins/jenkins.war
* Install OpenJDK while you're at it.
* Go to Jenkins and create a "Monitor an external job" called "New Job"
* Create an environment variable by $export JENKINS_HOME=http://jenkins_host:8080 , replacing “jenkins_host” with the server running Jenkins
* To have Jenkins monitor a script, run a command like the following...
java -jar /usr/lib/jenkins/WEB-INF/lib/jenkins-core-*.jar “New Job” /path_to/myreport.sh 2>&1 > /dev/null