sensu-plugins-memory-checks 3.1.3 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/bin/metrics-memory-vmstat.rb +47 -0
- data/lib/sensu-plugins-memory-checks/version.rb +2 -2
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 266cb76bef1e23e23ca0fbfaf953e950bbccb90dfb73bc79464e22a6c8ad94b1
|
4
|
+
data.tar.gz: d5dd46517d60ff8ae3cbe682df65e1b4bbdae88a06596eec3a21edc1105f6f7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 802394f10797a9607a870d79157484dbad1b6c1140edb9661aedc7a5fef4deebbba0956439ea233f657f9ce850eaff43f3870e1db81a595a76e4ec6ac1436ef7
|
7
|
+
data.tar.gz: 9fb57f40803249c8b4fcc9316fa443e7dfc6c4c005c327281d2bfcd3066ba313c8d5c6822b10ba4fd9fdc362347a7c6b8c7bebd5414d141bf28c276461f4c95b
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,10 @@ This CHANGELOG follows the located [here](https://github.com/sensu-plugins/commu
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
## [3.2.0] - 2018-04-17
|
9
|
+
### Added
|
10
|
+
- Added metrics-memory-vmstat.rb (@yuri-zubov sponsored by Actility, https://www.actility.com)
|
11
|
+
|
8
12
|
## [3.1.3] - 2018-03-27
|
9
13
|
### Security
|
10
14
|
- updated yard dependency to `~> 0.9.11` per: https://nvd.nist.gov/vuln/detail/CVE-2017-17042 (@majormoses)
|
@@ -141,7 +145,8 @@ This CHANGELOG follows the located [here](https://github.com/sensu-plugins/commu
|
|
141
145
|
### Added
|
142
146
|
- initial release
|
143
147
|
|
144
|
-
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-memory-checks/compare/3.
|
148
|
+
[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-memory-checks/compare/3.2.0...HEAD
|
149
|
+
[3.2.0]: https://github.com/sensu-plugins/sensu-plugins-memory-checks/compare/3.1.3..3.2.0
|
145
150
|
[3.1.3]: https://github.com/sensu-plugins/sensu-plugins-memory-checks/compare/3.1.2...3.1.3
|
146
151
|
[3.1.2]: https://github.com/sensu-plugins/sensu-plugins-memory-checks/compare/3.1.1...3.1.2
|
147
152
|
[3.1.1]: https://github.com/sensu-plugins/sensu-plugins-memory-checks/compare/3.1.0...3.1.1
|
@@ -0,0 +1,47 @@
|
|
1
|
+
#! /usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# metrics-memory-vmstat
|
4
|
+
#
|
5
|
+
# DESCRIPTION:
|
6
|
+
#
|
7
|
+
# OUTPUT:
|
8
|
+
# metric data
|
9
|
+
#
|
10
|
+
# PLATFORMS:
|
11
|
+
# Linux
|
12
|
+
#
|
13
|
+
# DEPENDENCIES:
|
14
|
+
# gem: sensu-plugin
|
15
|
+
#
|
16
|
+
# USAGE:
|
17
|
+
#
|
18
|
+
# NOTES:
|
19
|
+
#
|
20
|
+
# LICENSE:
|
21
|
+
# Zubov Yuri <yury.zubau@gmail.com> sponsored by Actility, https://www.actility.com
|
22
|
+
# Released under the same terms as Sensu (the MIT license); see LICENSE
|
23
|
+
# for details.
|
24
|
+
#
|
25
|
+
require 'sensu-plugin/metric/cli'
|
26
|
+
require 'socket'
|
27
|
+
|
28
|
+
class MetricsSoftnetStat < Sensu::Plugin::Metric::CLI::Graphite
|
29
|
+
option :scheme,
|
30
|
+
description: 'Metric naming scheme, text to prepend to metric',
|
31
|
+
short: '-s SCHEME',
|
32
|
+
long: '--scheme SCHEME',
|
33
|
+
default: "#{Socket.gethostname}.vmstat"
|
34
|
+
|
35
|
+
option :proc_path,
|
36
|
+
long: '--proc-path /proc',
|
37
|
+
proc: proc(&:to_s),
|
38
|
+
default: '/proc'
|
39
|
+
|
40
|
+
def run
|
41
|
+
File.open("#{config[:proc_path]}/vmstat", 'r').each_line do |line|
|
42
|
+
result = line.match(/(?<metric_name>\w+)[[:space:]]+(?<value>\d+)/)
|
43
|
+
output "#{config[:scheme]}.#{result[:metric_name]}", result[:value]
|
44
|
+
end
|
45
|
+
ok
|
46
|
+
end
|
47
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sensu-plugins-memory-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-
|
11
|
+
date: 2018-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sensu-plugin
|
@@ -177,6 +177,7 @@ executables:
|
|
177
177
|
- check-swap-percent.rb
|
178
178
|
- check-swap.rb
|
179
179
|
- metrics-memory-percent.rb
|
180
|
+
- metrics-memory-vmstat.rb
|
180
181
|
- metrics-memory.rb
|
181
182
|
extensions: []
|
182
183
|
extra_rdoc_files: []
|
@@ -193,6 +194,7 @@ files:
|
|
193
194
|
- bin/check-swap.rb
|
194
195
|
- bin/check-swap.sh
|
195
196
|
- bin/metrics-memory-percent.rb
|
197
|
+
- bin/metrics-memory-vmstat.rb
|
196
198
|
- bin/metrics-memory.rb
|
197
199
|
- lib/sensu-plugins-memory-checks.rb
|
198
200
|
- lib/sensu-plugins-memory-checks/version.rb
|