sensu-plugins-process-checks 2.5.0 → 2.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 +9 -1
- data/bin/check-threads-count.rb +4 -15
- data/bin/metrics-processes-threads-count.rb +0 -10
- data/lib/sensu-plugins-process-checks/version.rb +1 -1
- metadata +14 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a359a27504b2f6f1129f1221775b3e7d081be20a4b9bc092683f9a4f112ed961
|
4
|
+
data.tar.gz: 9a0665cdde92261c3726d9a4dc641fffb3196dc0c19d5468bf7050d3b1e76ac7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 820865ef5103241ff3d1a4747239b6c7444d0bde906bcea7a248ee6549795a55bbb60b58d90326823be549a302f1ad56d5c52c2ff408ac9695038965a4bfecac
|
7
|
+
data.tar.gz: 9496e6fa7679ad4afb56134260f6e453bf10b15a935595ea959b91e91d85a59baebbb15d9842427adec5a80b1ab23281236b8c6eb658dfeece23e4975a2103fc
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,13 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [2.6.0] - 2017-12-05
|
10
|
+
### Changed
|
11
|
+
- loosen dependency of `sys-proctable` (@majormoses)
|
12
|
+
|
13
|
+
### Removed
|
14
|
+
- check-threads-count.rb, metrics-processes-threads-count.rb: checks on `sys-proctable` versions as we now require new enough versions. (@majormoses)
|
15
|
+
|
9
16
|
## [2.5.0] - 2017-10-04
|
10
17
|
### Added
|
11
18
|
- metric-per-processes.py: Add metrics filter (@rthouvenin)
|
@@ -149,7 +156,8 @@ This CHANGELOG follows the format listed [here](https://github.com/sensu-plugins
|
|
149
156
|
- built against 1.9.3, 2.0, 2.1
|
150
157
|
- cryptographically signed
|
151
158
|
|
152
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-process-checks/compare/2.
|
159
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-process-checks/compare/2.6.0...HEAD
|
160
|
+
[2.6.0]: https://github.com/sensu-plugins/sensu-plugins-process-checks/compare/2.5.0...2.6.0
|
153
161
|
[2.5.0]: https://github.com/sensu-plugins/sensu-plugins-process-checks/compare/2.4.0...2.5.0
|
154
162
|
[2.4.0]: https://github.com/sensu-plugins/sensu-plugins-process-checks/compare/2.3.0...2.4.0
|
155
163
|
[2.3.0]: https://github.com/sensu-plugins/sensu-plugins-process-checks/compare/2.2.0...2.3.0
|
data/bin/check-threads-count.rb
CHANGED
@@ -48,13 +48,6 @@ class ThreadsCount < Sensu::Plugin::Check::CLI
|
|
48
48
|
default: 32_000,
|
49
49
|
proc: proc(&:to_i)
|
50
50
|
|
51
|
-
PROCTABLE_MSG = 'sys-proctable version newer than 0.9.5 is required for counting threads with -t or --threads'.freeze
|
52
|
-
|
53
|
-
# Exit with an unknown if sys-proctable is not high enough to support counting threads.
|
54
|
-
def check_proctable_version
|
55
|
-
Gem.loaded_specs['sys-proctable'].version > Gem::Version.create('0.9.5')
|
56
|
-
end
|
57
|
-
|
58
51
|
# Takes a value to be tested as an integer. If a new Integer instance cannot be created from it, return 1.
|
59
52
|
# See the comments on get_process_threads() for why 1 is returned.
|
60
53
|
def test_int(i)
|
@@ -86,13 +79,9 @@ class ThreadsCount < Sensu::Plugin::Check::CLI
|
|
86
79
|
|
87
80
|
# Main function
|
88
81
|
def run
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
critical "#{threads} threads running, over threshold #{config[:crit]}" if threads > config[:crit]
|
94
|
-
warning "#{threads} threads running, over threshold #{config[:warn]}" if threads > config[:warn]
|
95
|
-
ok "#{threads} threads running"
|
96
|
-
end
|
82
|
+
threads = count_threads
|
83
|
+
critical "#{threads} threads running, over threshold #{config[:crit]}" if threads > config[:crit]
|
84
|
+
warning "#{threads} threads running, over threshold #{config[:warn]}" if threads > config[:warn]
|
85
|
+
ok "#{threads} threads running"
|
97
86
|
end
|
98
87
|
end
|
@@ -58,13 +58,6 @@ class ProcessesThreadsCount < Sensu::Plugin::Metric::CLI::Graphite
|
|
58
58
|
boolean: true,
|
59
59
|
default: false
|
60
60
|
|
61
|
-
PROCTABLE_MSG = 'sys-proctable version newer than 0.9.5 is required for counting threads with -t or --threads'.freeze
|
62
|
-
|
63
|
-
# Exit with an unknown if sys-proctable is not high enough to support counting threads.
|
64
|
-
def check_proctable_version
|
65
|
-
Gem.loaded_specs['sys-proctable'].version > Gem::Version.create('0.9.5')
|
66
|
-
end
|
67
|
-
|
68
61
|
# Takes a value to be tested as an integer. If a new Integer instance cannot be created from it, return 1.
|
69
62
|
# See the comments on get_process_threads() for why 1 is returned.
|
70
63
|
def test_int(i)
|
@@ -112,9 +105,6 @@ class ProcessesThreadsCount < Sensu::Plugin::Metric::CLI::Graphite
|
|
112
105
|
|
113
106
|
# Main function
|
114
107
|
def run
|
115
|
-
if config[:threads] || config[:statuses]
|
116
|
-
unknown PROCTABLE_MSG unless check_proctable_version
|
117
|
-
end
|
118
108
|
ps_table = Sys::ProcTable.ps
|
119
109
|
processes = ps_table.length
|
120
110
|
threads = count_threads(ps_table) if config[:threads]
|
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: 2.
|
4
|
+
version: 2.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: 2017-
|
11
|
+
date: 2017-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: english
|
@@ -42,14 +42,14 @@ dependencies:
|
|
42
42
|
name: sys-proctable
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 0.9.8
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 0.9.8
|
55
55
|
- !ruby/object:Gem::Dependency
|
@@ -123,47 +123,47 @@ dependencies:
|
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '10.0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: redcarpet
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: '3.
|
131
|
+
version: '3.2'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: '3.
|
138
|
+
version: '3.2'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
140
|
+
name: rspec
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
145
|
+
version: '3.1'
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
152
|
+
version: '3.1'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
154
|
+
name: rubocop
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version:
|
159
|
+
version: 0.40.0
|
160
160
|
type: :development
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version:
|
166
|
+
version: 0.40.0
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: yard
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -236,7 +236,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
236
236
|
version: '0'
|
237
237
|
requirements: []
|
238
238
|
rubyforge_project:
|
239
|
-
rubygems_version: 2.
|
239
|
+
rubygems_version: 2.7.3
|
240
240
|
signing_key:
|
241
241
|
specification_version: 4
|
242
242
|
summary: Sensu plugins for checking running processes
|