sensu-plugins-process-checks 3.1.0 → 3.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 +4 -4
- data/CHANGELOG.md +10 -1
- data/bin/metrics-processes-threads-count.rb +15 -1
- data/lib/sensu-plugins-process-checks/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a288fd9a1ed892d88ea986fc8e8b6fbaedbc34cfae8e08d2d44ddb5c834b7c2
|
4
|
+
data.tar.gz: 6bf54c41a16984d27bfb3b55b39ca82af8de47329bebaac5982693598a8ea194
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b577a669141a93bd719e36c70ac81da62fb450cabe9ed61aa0421b7981195dc253101bfac4bffc6cac80a18dda7ee658a2ca1c59db93940bf5cd80e3574d5f3
|
7
|
+
data.tar.gz: cfe654f17518f58fbf14a9da7af419047eebfe09fd1b0525e3bb7abdba28681146459af4aac384dec228c24c6ead3d7ae0886749879c133e1d319a1a9050a160
|
data/CHANGELOG.md
CHANGED
@@ -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.
|
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
|
-
|
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
|
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.
|
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-
|
11
|
+
date: 2018-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: english
|