sensu-plugins-jenkins 0.0.5 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 63a4d29dc90e75db8b54b6699b82f29bfdc2dceb
4
- data.tar.gz: b1b01af4fbac067de78bdb318595fee58c7d9226
3
+ metadata.gz: 9e757920a55c831fe7d0238b5845533a263b4e67
4
+ data.tar.gz: ae38f4a31c37b33a77619b2a788f7c4c326f6831
5
5
  SHA512:
6
- metadata.gz: b442d6bcd6d415323cef4244c8a48cc6ac822a0cc0d3b1b962b8a30a59038a41ed890b40cfe14c89fb43d5cbac49c73449944f7ed182f0360fdf97284bc9c89d
7
- data.tar.gz: 6358caaf463c7fdeae1ac9ee1f98b72dc19fbdc680ebb7d470abe0db887c6a6d952b3debf7643315cb7e6554942e101370688d7024d334dc8b839bc72667629f
6
+ metadata.gz: 86379dc0571be4a12e1b7bfcfe934457574f83170c051d23d15e02e2d79b257269b75a26a94f9511f3139e760e72ffa1f2dc34a2bfb0d338f5be34853f656008
7
+ data.tar.gz: c24519f8cd7ea4e1d4b939d0e816d2cd2fd599f43b27a262e45ba281fe7779926ecc4bb9cb8da0d11c93a28aa68472198dbccdc194324463c7a661cc447ff737
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -5,6 +5,13 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
5
5
 
6
6
  ## [Unreleased][unreleased]
7
7
 
8
+ ## [0.1.0] - 2015-12-14
9
+ ### Added
10
+ - Enhanced error messages in particular when the check configuration is wrong
11
+ - Update dependent jenkins-api version to 1.4.2
12
+ - Changed check-jenkins-job-status.rb and check-jenkins-build-time.rb to use server_url to allow
13
+ passing credentials
14
+
8
15
  ## [0.0.5] - 2015-08-24
9
16
  ### Added
10
17
  - PR #5
data/README.md CHANGED
@@ -21,6 +21,6 @@
21
21
 
22
22
  ## Installation
23
23
 
24
- [Installation and Setup](https://github.com/sensu-plugins/documentation/blob/master/user_docs/installation_instructions.md)
24
+ [Installation and Setup](http://sensu-plugins.io/docs/installation_instructions.html)
25
25
 
26
26
  ## Notes
@@ -57,7 +57,12 @@ class JenkinsBuildTime < Sensu::Plugin::Check::CLI
57
57
  jobs = parse_jobs_param
58
58
 
59
59
  jobs.each do |job_name, time_expression|
60
- last_build_time = build_time(job_name, last_successful_build_number(job_name))
60
+ begin
61
+ last_build_time = build_time(job_name, last_successful_build_number(job_name))
62
+ rescue
63
+ critical "Error looking up Jenkins job: #{job_name}"
64
+ end
65
+
61
66
  if time_expression_is_window?(time_expression)
62
67
  unless time_within_window?(last_build_time,
63
68
  parse_window_start(time_expression),
@@ -79,7 +84,7 @@ class JenkinsBuildTime < Sensu::Plugin::Check::CLI
79
84
  private
80
85
 
81
86
  def jenkins
82
- @jenkins ||= JenkinsApi::Client.new(server_ip: config[:url], log_level: 3)
87
+ @jenkins ||= JenkinsApi::Client.new(server_url: config[:url], log_level: 3)
83
88
  end
84
89
 
85
90
  def last_successful_build_number(job_name)
@@ -66,7 +66,7 @@ class JenkinsJobChecker < Sensu::Plugin::Check::CLI
66
66
 
67
67
  def jenkins_api_client
68
68
  @jenkins_api_client ||= JenkinsApi::Client.new(
69
- server_ip: config[:server_api_url],
69
+ server_url: config[:server_api_url],
70
70
  log_level: config[:client_log_level].to_i
71
71
  )
72
72
  end
@@ -85,6 +85,8 @@ class JenkinsJobChecker < Sensu::Plugin::Check::CLI
85
85
 
86
86
  def job_status(job_name)
87
87
  jenkins_api_client.job.get_current_build_status(job_name)
88
+ rescue
89
+ critical "Error looking up Jenkins job: #{job_name}"
88
90
  end
89
91
 
90
92
  def failed_jobs
@@ -70,5 +70,7 @@ class JenkinsMetricsPingPongChecker < Sensu::Plugin::Check::CLI
70
70
  critical 'Jenkins Service is not responding'
71
71
  rescue RestClient::RequestTimeout
72
72
  critical 'Jenkins Service Connection timed out'
73
+ rescue
74
+ critical "Couldn't get: '#{testurl}' is the server option set correctly and the Jenkins metrics plugin installed?"
73
75
  end
74
76
  end
@@ -1,8 +1,8 @@
1
1
  module SensuPluginsJenkins
2
2
  module Version
3
3
  MAJOR = 0
4
- MINOR = 0
5
- PATCH = 5
4
+ MINOR = 1
5
+ PATCH = 0
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-jenkins
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sensu-Plugins and contributors
@@ -30,7 +30,7 @@ cert_chain:
30
30
  8sHuVruarogxxKPBzlL2is4EUb6oN/RdpGx2l4254+nyR+abg//Ed27Ym0PkB4lk
31
31
  HP0m8WSjZmFr109pE/sVsM5jtOCvogyujQOjNVGN4gz1wwPr
32
32
  -----END CERTIFICATE-----
33
- date: 2015-08-27 00:00:00.000000000 Z
33
+ date: 2015-12-14 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: sensu-plugin
@@ -66,14 +66,14 @@ dependencies:
66
66
  requirements:
67
67
  - - '='
68
68
  - !ruby/object:Gem::Version
69
- version: 1.3.0
69
+ version: 1.4.2
70
70
  type: :runtime
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - '='
75
75
  - !ruby/object:Gem::Version
76
- version: 1.3.0
76
+ version: 1.4.2
77
77
  - !ruby/object:Gem::Dependency
78
78
  name: chronic_duration
79
79
  requirement: !ruby/object:Gem::Requirement
@@ -214,7 +214,10 @@ dependencies:
214
214
  - - "~>"
215
215
  - !ruby/object:Gem::Version
216
216
  version: '0.10'
217
- description: Sensu plugins for jenkins
217
+ description: |-
218
+ This plugin provides native Jenkins instrumentation
219
+ for monitoring and metrics collection, including:
220
+ health, job status, metrics via `JQS`, and others
218
221
  email: "<sensu-users@googlegroups.com>"
219
222
  executables:
220
223
  - metrics-jenkins.rb
metadata.gz.sig CHANGED
Binary file