sensu-plugins-java 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6f55dbfc122fb05ed378456c1313e12a19d7a20c
4
- data.tar.gz: 85bb06cf64b9caef3e72bd8bbc350b6117006c47
3
+ metadata.gz: 895f9098585c2dc97ec261ecab799d36fe290207
4
+ data.tar.gz: 3138e4d7dd08cbaf4d5dbeaa8bb030e4c45ec189
5
5
  SHA512:
6
- metadata.gz: c15154988868e6635625cdd0ab0f9010ff2031c2c45bf41c5b2bca8db59dfb7a4a48d718c9661338bfbb5b40d04f1b6cc8aa765e598b1c0a8a2d421c0fc3bd56
7
- data.tar.gz: eae92df6d62ec66f561fb39bd11ac6a5fd68768b37aec44bbfd5c0c83f2767d99fbed33a55b390ef81890fd1ab88df0de40ed539374d6c5926db5a375cd3af0d
6
+ metadata.gz: a7a6610c073aa86ab9e6ffce8ffb810e73240677ff3d98f2e1da0752537f58e79007ce0c82102abfa9b706bc77a768974987c8b90eb8e1621e5f0900a5ee95a8
7
+ data.tar.gz: 51f0574f91320de3bb4d2ddf5930ce842291b1a2b5a4b9edcd01349c89991f63087ace945a362aff64b1713275a71ae41725b0635dd9fe369c9857179568808a
data/CHANGELOG.md CHANGED
@@ -5,6 +5,10 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [1.2.0] - 2017-08-20
9
+ ### Added
10
+ - check-java-permgen.rb: added an option to specify java bin dir (@sovaa)
11
+
8
12
  ## [1.1.0] - 2017-08-12
9
13
  ### Added
10
14
  - check-java-permgen.rb: added an option to run `jps` and `jstsat` with sudo (@sovaa)
@@ -65,6 +69,7 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
65
69
  - initial release
66
70
 
67
71
  [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-java/compare/1.1.0...HEAD
72
+ [1.2.0]: https://github.com/sensu-plugins/sensu-plugins-java/compare/1.1.0...1.2.0
68
73
  [1.1.0]: https://github.com/sensu-plugins/sensu-plugins-java/compare/1.0.0...1.1.0
69
74
  [1.0.0]: https://github.com/sensu-plugins/sensu-plugins-java/compare/0.0.6...1.0.0
70
75
  [0.0.6]: https://github.com/sensu-plugins/sensu-plugins-java/compare/0.0.5...0.0.6
@@ -37,6 +37,7 @@ class CheckJavaPermGen < Sensu::Plugin::Check::CLI
37
37
  option :warn, short: '-w WARNLEVEL', default: '85'
38
38
  option :crit, short: '-c CRITLEVEL', default: '95'
39
39
  option :as_sudo, short: '-s', description: 'Run as sudo', boolean: true, required: false
40
+ option :java, short: '-j <java bin dir>', description: 'java bin dir, including trailing slash', default: ''
40
41
 
41
42
  def run
42
43
  warn_procs = []
@@ -44,20 +45,20 @@ class CheckJavaPermGen < Sensu::Plugin::Check::CLI
44
45
  java_pids = []
45
46
  sudo = config[:as_sudo] ? 'sudo ' : ''
46
47
 
47
- IO.popen("#{sudo}jps -q") do |cmd|
48
+ IO.popen("#{sudo}#{config[:java]}jps -q") do |cmd|
48
49
  java_pids = cmd.read.split
49
50
  end
50
51
 
51
52
  java_pids.each do |java_proc|
52
53
  pgcmx = nil
53
54
  pu = nil
54
- IO.popen("#{sudo}jstat -gcpermcapacity #{java_proc} 1 1 2>&1") do |cmd|
55
+ IO.popen("#{sudo}#{config[:java]}jstat -gcpermcapacity #{java_proc} 1 1 2>&1") do |cmd|
55
56
  pgcmx = cmd.read.split[9]
56
57
  end
57
58
  exit_code = $CHILD_STATUS.exitstatus
58
59
  next if exit_code != 0
59
60
 
60
- IO.popen("#{sudo}jstat -gcold #{java_proc} 1 1 2>&1") do |cmd|
61
+ IO.popen("#{sudo}#{config[:java]}jstat -gcold #{java_proc} 1 1 2>&1") do |cmd|
61
62
  pu = cmd.read.split[9]
62
63
  end
63
64
  exit_code = $CHILD_STATUS.exitstatus
@@ -1,7 +1,7 @@
1
1
  module SensuPluginsJava
2
2
  module Version
3
3
  MAJOR = 1
4
- MINOR = 1
4
+ MINOR = 2
5
5
  PATCH = 0
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-java
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.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: 2017-08-12 00:00:00.000000000 Z
11
+ date: 2017-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin