sensu-plugins-jenkins 1.5.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +6 -1
- data/bin/check-jenkins-health.rb +2 -2
- data/bin/check-jenkins.rb +16 -1
- data/bin/metrics-jenkins.rb +17 -1
- data/lib/sensu-plugins-jenkins/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 39fd5b3937fe6713372b5d63c8e92169d887685b139d45c30a24377fedc67361
|
4
|
+
data.tar.gz: fa97643c9506f34e80050a32771aee13d57fb85c4c5be1e4474c06a2f07f45b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5c34ddffef6b175f89184ad1b98016e2f7952f22a48490f387d78a3608290428aa99da3711e22c1ffdcc4f6ec41aac2bfeb6798c42839405ec31554231477dc
|
7
|
+
data.tar.gz: cb4e619432b734dc2d4ed385d3dc1d0d5e05d67f4d9d8daaf829244cbd20e35623c42e99b99500d466137a1f9309ffd09604146181cfc926f21a4cda9e768526
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,10 @@ This CHANGELOG follows the format listed at [Our CHANGELOG Guidelines](https://g
|
|
5
5
|
Which is based on [Keep A Changelog](http://keepachangelog.com/)
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
|
+
## [1.6.0] - 2018-02-21
|
9
|
+
### Added
|
10
|
+
- check-jenkins.rb: Add --insecure parameter to allow self signed ssl certs
|
11
|
+
- metrics-jenkins.rb: Add --insecure parameter to allow self signed ssl certs
|
8
12
|
|
9
13
|
## [1.5.0] - 2018-02-17
|
10
14
|
### Added
|
@@ -77,7 +81,8 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
|
|
77
81
|
### Added
|
78
82
|
- initial release
|
79
83
|
|
80
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-jenkins/compare/1.
|
84
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-jenkins/compare/1.6.0...HEAD
|
85
|
+
[1.6.0]: https://github.com/sensu-plugins/sensu-plugins-jenkins/compare/1.5.0...1.6.0
|
81
86
|
[1.5.0]: https://github.com/sensu-plugins/sensu-plugins-jenkins/compare/1.4.0...1.5.0
|
82
87
|
[1.4.0]: https://github.com/sensu-plugins/sensu-plugins-jenkins/compare/1.3.0...1.4.0
|
83
88
|
[1.3.0]: https://github.com/sensu-plugins/sensu-plugins-jenkins/compare/1.2.0...1.3.0
|
data/bin/check-jenkins-health.rb
CHANGED
@@ -81,8 +81,8 @@ class JenkinsMetricsHealthChecker < Sensu::Plugin::Check::CLI
|
|
81
81
|
|
82
82
|
r = if config[:https] && config[:insecure]
|
83
83
|
RestClient::Resource.new(testurl, timeout: config[:timeout], verify_ssl: false).get
|
84
|
-
|
85
|
-
|
84
|
+
elsif config[:https]
|
85
|
+
RestClient::Resource.new(testurl, timeout: config[:timeout], verify_ssl: true).get
|
86
86
|
else
|
87
87
|
RestClient::Resource.new(testurl, timeout: config[:timeout]).get
|
88
88
|
end
|
data/bin/check-jenkins.rb
CHANGED
@@ -58,10 +58,25 @@ class JenkinsMetricsPingPongChecker < Sensu::Plugin::Check::CLI
|
|
58
58
|
description: 'Enabling https connections',
|
59
59
|
default: false
|
60
60
|
|
61
|
+
option :insecure,
|
62
|
+
short: '-k',
|
63
|
+
long: '--insecure',
|
64
|
+
boolean: true,
|
65
|
+
description: 'Perform "insecure" SSL connections and transfers.',
|
66
|
+
default: false
|
67
|
+
|
61
68
|
def run
|
62
69
|
https ||= config[:https] ? 'https' : 'http'
|
63
70
|
testurl = "#{https}://#{config[:server]}:#{config[:port]}#{config[:uri]}"
|
64
|
-
|
71
|
+
|
72
|
+
r = if config[:https] && config[:insecure]
|
73
|
+
RestClient::Resource.new(testurl, timeout: 5, verify_ssl: false).get
|
74
|
+
elsif config[:https]
|
75
|
+
RestClient::Resource.new(testurl, timeout: 5, verify_ssl: true).get
|
76
|
+
else
|
77
|
+
RestClient::Resource.new(testurl, timeout: 5).get
|
78
|
+
end
|
79
|
+
|
65
80
|
if r.code == 200 && r.body.include?('pong')
|
66
81
|
ok 'Jenkins Service is up'
|
67
82
|
else
|
data/bin/metrics-jenkins.rb
CHANGED
@@ -71,6 +71,13 @@ class JenkinsMetrics < Sensu::Plugin::Metric::CLI::Graphite
|
|
71
71
|
description: 'Enabling https connections',
|
72
72
|
default: false
|
73
73
|
|
74
|
+
option :insecure,
|
75
|
+
short: '-k',
|
76
|
+
long: '--insecure',
|
77
|
+
boolean: true,
|
78
|
+
description: 'Perform "insecure" SSL connections and transfers.',
|
79
|
+
default: false
|
80
|
+
|
74
81
|
option :timeout,
|
75
82
|
short: '-t SECONDS',
|
76
83
|
long: '--timeout SECONDS',
|
@@ -96,7 +103,16 @@ class JenkinsMetrics < Sensu::Plugin::Metric::CLI::Graphite
|
|
96
103
|
@stop = nil
|
97
104
|
begin
|
98
105
|
https ||= config[:https] ? 'https' : 'http'
|
99
|
-
|
106
|
+
testurl = "#{https}://#{config[:server]}:#{config[:port]}#{config[:uri]}"
|
107
|
+
|
108
|
+
r = if config[:https] && config[:insecure]
|
109
|
+
RestClient::Resource.new(testurl, timeout: config[:timeout], verify_ssl: false).get
|
110
|
+
elsif config[:https]
|
111
|
+
RestClient::Resource.new(testurl, timeout: config[:timeout], verify_ssl: true).get
|
112
|
+
else
|
113
|
+
RestClient::Resource.new(testurl, timeout: config[:timeout]).get
|
114
|
+
end
|
115
|
+
|
100
116
|
@stop = DateTime.now
|
101
117
|
all_metrics = JSON.parse(r)
|
102
118
|
metric_groups = all_metrics.keys - SKIP_ROOT_KEYS
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-jenkins
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sensu-Plugins and contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-plugin
|
@@ -218,12 +218,12 @@ description: |-
|
|
218
218
|
health, job status, metrics via `JQS`, and others
|
219
219
|
email: "<sensu-users@googlegroups.com>"
|
220
220
|
executables:
|
221
|
-
- metrics-jenkins-jqs.rb
|
222
|
-
- check-jenkins-job-status.rb
|
223
|
-
- check-jenkins-health.rb
|
224
221
|
- check-jenkins-build-time.rb
|
225
|
-
-
|
222
|
+
- check-jenkins-health.rb
|
223
|
+
- check-jenkins-job-status.rb
|
226
224
|
- check-jenkins.rb
|
225
|
+
- metrics-jenkins-jqs.rb
|
226
|
+
- metrics-jenkins.rb
|
227
227
|
extensions: []
|
228
228
|
extra_rdoc_files: []
|
229
229
|
files:
|
@@ -264,7 +264,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
264
264
|
version: '0'
|
265
265
|
requirements: []
|
266
266
|
rubyforge_project:
|
267
|
-
rubygems_version: 2.
|
267
|
+
rubygems_version: 2.7.6
|
268
268
|
signing_key:
|
269
269
|
specification_version: 4
|
270
270
|
summary: Sensu plugins for jenkins
|