sensu-plugins-process-checks 3.1.0 → 3.2.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
  SHA256:
3
- metadata.gz: c84badbc2308dec8746d549464c77445f7974c0aaf0e44f407e5264333654594
4
- data.tar.gz: 0a6be9fe7ec034002ff7330c217d94700cf04ba1a92ed5372885b1c71d651555
3
+ metadata.gz: 2a288fd9a1ed892d88ea986fc8e8b6fbaedbc34cfae8e08d2d44ddb5c834b7c2
4
+ data.tar.gz: 6bf54c41a16984d27bfb3b55b39ca82af8de47329bebaac5982693598a8ea194
5
5
  SHA512:
6
- metadata.gz: e21f9d5f026129434aa2803f26187d8e6ef84cfbf36d198ccff2cb88c612e215b1420f4204627a1d86026271871f3dccca7dea5f882ac855145a69bb3096335b
7
- data.tar.gz: 0327f36aee33c447a4391980eb465c568c893fe7fa762698d47e13ac392211459498fb70d9c93621173ad5ea50127464fc6189f53ef400986036caf5f654a871
6
+ metadata.gz: 6b577a669141a93bd719e36c70ac81da62fb450cabe9ed61aa0421b7981195dc253101bfac4bffc6cac80a18dda7ee658a2ca1c59db93940bf5cd80e3574d5f3
7
+ data.tar.gz: cfe654f17518f58fbf14a9da7af419047eebfe09fd1b0525e3bb7abdba28681146459af4aac384dec228c24c6ead3d7ae0886749879c133e1d319a1a9050a160
@@ -6,6 +6,14 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [3.2.0] - 2018-05-02
10
+ ### Fixed
11
+ - metrics-processes-threads-count.rb: Backward compatible support for TASK_IDLE process state in Linux 4.14+ (@awangptc)
12
+
13
+ ### Added
14
+ - metrics-processes-threads-count.rb: Add option to separate out TASK_IDLE process into it's own metric (@awangptc)
15
+
16
+
9
17
  ## [3.1.0] - 2018-05-02
10
18
  ### Added
11
19
  - metrics-ipcs.rb: Add ipcs metrics (@yuri-zubov sponsored by Actility, https://www.actility.com)
@@ -182,7 +190,8 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
182
190
  - built against 1.9.3, 2.0, 2.1
183
191
  - cryptographically signed
184
192
 
185
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-process-checks/compare/3.1.0...HEAD
193
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-process-checks/compare/3.2.0...HEAD
194
+ [3.2.0]: https://github.com/sensu-plugins/sensu-plugins-process-checks/compare/3.1.0...3.2.0
186
195
  [3.1.0]: https://github.com/sensu-plugins/sensu-plugins-process-checks/compare/3.0.2...3.1.0
187
196
  [3.0.2]: https://github.com/sensu-plugins/sensu-plugins-process-checks/compare/3.0.1...3.0.2
188
197
  [3.0.1]: https://github.com/sensu-plugins/sensu-plugins-process-checks/compare/3.0.0...3.0.1
@@ -58,6 +58,13 @@ class ProcessesThreadsCount < Sensu::Plugin::Metric::CLI::Graphite
58
58
  boolean: true,
59
59
  default: false
60
60
 
61
+ option :idle_state,
62
+ description: 'If specified, count TASK_IDLE (I) state in separate .idle metric. Note: TASK_IDLE is only available on Linux Kernels 4.14 and higher',
63
+ short: '-I',
64
+ long: '--idle-state',
65
+ boolean: true,
66
+ default: false
67
+
61
68
  # Takes a value to be tested as an integer. If a new Integer instance cannot be created from it, return 1.
62
69
  # See the comments on get_process_threads() for why 1 is returned.
63
70
  def test_int(i)
@@ -95,9 +102,14 @@ class ProcessesThreadsCount < Sensu::Plugin::Metric::CLI::Graphite
95
102
  %w[S R D T t X Z].each do |v|
96
103
  list_proc[v] = 0
97
104
  end
105
+ list_proc['I'] = 0 if config[:idle_state]
98
106
  if ps_table.first.respond_to?(:state)
99
107
  ps_table.each do |pr|
100
- list_proc[pr[:state]] += 1
108
+ state = pr[:state]
109
+ if state == 'I'
110
+ state = 'D' unless config[:idle_state]
111
+ end
112
+ list_proc[state] += 1
101
113
  end
102
114
  end
103
115
  list_proc
@@ -131,6 +143,8 @@ class ProcessesThreadsCount < Sensu::Plugin::Metric::CLI::Graphite
131
143
  output "#{[config[:scheme], 'dead'].join('.')} #{proc_count} #{timestamp}"
132
144
  when 'Z'
133
145
  output "#{[config[:scheme], 'zombie'].join('.')} #{proc_count} #{timestamp}"
146
+ when 'I'
147
+ output "#{[config[:scheme], 'idle'].join('.')} #{proc_count} #{timestamp}"
134
148
  end
135
149
  end
136
150
  end
@@ -1,7 +1,7 @@
1
1
  module SensuPluginsProcessChecks
2
2
  module Version
3
3
  MAJOR = 3
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-process-checks
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.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: 2018-05-02 00:00:00.000000000 Z
11
+ date: 2018-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: english