Could someone help me on writting a perl script which will check health of each jenkins job on different servers. Here are the steps I want to use for plugin creation:
Using jenkins REST API I want to found jenkins jobs and stored them into an array.
http://my-host:8080/api/xml
Test_Job1 http://jenkins-host:8080/job/Test_job1/ red Test_job2 http://jenkins-host:8080/job/Test_job2/ red Test_View http://jenkins-host:8080/
For each jenkins job stored in an array I want to monitor HealthReport of each job using REST API.
http://my-host:8080/Job_name/api/xml
Test Result: 1 test failing out of a total of 78 tests.
health-80plus.png 98According to the
<score>98</score>
of jenkins job, I want to display OK,CRITICAL,WARNING on nagios GUI.if
<score>98</score>
is less than 50 it should show CRITICAL on nagios GUI.