sensu-plugins-memory-checks 3.1.3 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0da007562b0f08aedb3388c729a5f9a17d54e69a23a5ccc7294cdac801ca2147
4
- data.tar.gz: 8e5021e550b4e07e4083c8363ac3e751ca74ab48ac79e41b2a7f3edb39c9b61a
3
+ metadata.gz: 266cb76bef1e23e23ca0fbfaf953e950bbccb90dfb73bc79464e22a6c8ad94b1
4
+ data.tar.gz: d5dd46517d60ff8ae3cbe682df65e1b4bbdae88a06596eec3a21edc1105f6f7b
5
5
  SHA512:
6
- metadata.gz: 0a7847dfceb02ac6182f6ae63920f749f884e5985fd6a917727f28cf0a56a12371ef37be84556c2275b61902fbd10b56ffa4f09f9b9d48fda57aeef70cec40e8
7
- data.tar.gz: 03470b90e9810585b4b962366a95865be7d70cf3c0c28f8a9be0ad59ae826ca45aec6caad5327fed9adfb0acefc0a02446ec8ac3f92236f5539e52c92533b4d7
6
+ metadata.gz: 802394f10797a9607a870d79157484dbad1b6c1140edb9661aedc7a5fef4deebbba0956439ea233f657f9ce850eaff43f3870e1db81a595a76e4ec6ac1436ef7
7
+ data.tar.gz: 9fb57f40803249c8b4fcc9316fa443e7dfc6c4c005c327281d2bfcd3066ba313c8d5c6822b10ba4fd9fdc362347a7c6b8c7bebd5414d141bf28c276461f4c95b
@@ -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.1.3...HEAD
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
@@ -1,8 +1,8 @@
1
1
  module SensuPluginsMemoryChecks
2
2
  module Version
3
3
  MAJOR = 3
4
- MINOR = 1
5
- PATCH = 3
4
+ MINOR = 2
5
+ PATCH = 0
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  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.1.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-03-27 00:00:00.000000000 Z
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