Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 47 lines (31 sloc) 1.799 kb
7a08e5f @jonlives Initial commit
jonlives authored
1 # nagios-jenkins-plugin
2
3 A nagios plugin for which lets you check jenkins jobs according to various criteria.
4
5 ## How to use it
6
7 The plugin supports several options, which you can pass "0" to disable that particular threshold.
8
9 Usage: check_jenkins_job_extended url jobname concurrentFailsThreshold concurrentUnstableThreshold buildDurationThresholdMilliseconds lastStableBuildThresholdInMinutesWarn lastStableBuildThresholdInMinutesCrit
10
11 * url: The URL to your jenkins server
12
13 * jobname: The name of the jenkins job you'd like to check
14
15 * concurrentFailsThreshold: The number of concurrent failing builds it should CRIT alert on
16
17 * concurrentUnstableThreshold: The number of concurrent unstable builds it should CRIT alert on
18
19 * buildDurationThresholdMilliseconds: It will alert if the last build took longer than this number of milliseconds to complete
20
21 * lastStableBuildThresholdInMinutesWarn: WARN if it's been this number of minutes since the last stable build
22
23 * lastStableBuildThresholdInMinutesCrit: CRIT if it's been this number of minutes since the last stable build
24
25 ## Example
26
27 A sample nagios command using this plugin.
28
29 ```
30 define command {
31 command_name check_jenkins_job_ext
32 command_line $USER1$/check_jenkins_job_extended.pl $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ $ARG7$
33 }
34 ```
35
36 A sample nagios service using the above command to warn when it's been 4 mins since the last stable build, and crit when it's been 20.
37
38 ```
39 define service {
40 use local-service
41 host_name buildserver.mycompany.com
42 service_description Jenkins - prod build
43 check_interval 1
44 check_command check_jenkins_job_ext!http://buildserver.mycompany.com!prod!0!0!0!4!20
45 contacts bob,bill
46 }
47 ```
Something went wrong with that request. Please try again.