sensu-plugins-memory-checks 0.0.2 → 0.0.3

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
  SHA1:
3
- metadata.gz: 30fb61150d12e0d3c97dbd42615762fcc166f638
4
- data.tar.gz: 9abfb763f7dcb0309feea24509859f244ba4b6da
3
+ metadata.gz: e060602ffbcccfa0e5b1eb05d311086612d8caaa
4
+ data.tar.gz: 5347bdd864d6e55c1cc6767bd0cdad5f1276c3c3
5
5
  SHA512:
6
- metadata.gz: e682ece24ea6f0b55e8f0fc0716927f1b097792a0aae0bb08a3c844f26b5d9ea0e6145e84028e5ce76d8a6f63bb410b7b977c0317803d460ed677d32c5fa16b7
7
- data.tar.gz: f54f0d58d532b17bf5fc6890279faccf8c137a9417f2b9f181d14135499af3d0ba1c18e1f5d5c965ad1a9304f41018532d90f2c581205362414e5e736c93372c
6
+ metadata.gz: 3732b8c2265f871c44f2a5d8a679cf80e650ecfceb4b1cec731b3e0d8228bb3ad6e8cb205787d56a46e47c3761f34e7bb8df60242e86cb30c122d8aab6a6a3b3
7
+ data.tar.gz: fcd96681cd02562c46e27e3574d011d65414e1de4c39916c03cbf24ce6762a99881df078cd877a02cb3b92cbf18cd3811b52d486ccfcd9ac62e57ad9ef9e2c48
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -5,15 +5,18 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
5
5
 
6
6
  ## Unreleased][unreleased]
7
7
 
8
- ## 0.0.1 - 2015-05-21
9
-
8
+ ## [0.0.3] - 2015-06-29
10
9
  ### Added
11
- - initial release
10
+ - Support for Fedora22 and Cent7 to `check-memory-pcnt.sh`
11
+ - Add wrapper for all shell scripts
12
12
 
13
13
  ## [0.0.2] - 2015-06-03
14
-
15
14
  ### Fixed
16
15
  - added binstubs
17
-
18
16
  ### Changed
19
- - removed cruft from /lib
17
+ - removed cruft from /lib
18
+
19
+ ## 0.0.1 - 2015-05-21
20
+ ### Added
21
+ - initial release
22
+
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ bin_dir = File.expand_path(File.dirname(__FILE__))
4
+ shell_script_path = File.join(bin_dir, 'check-mem.sh')
5
+
6
+ exec shell_script_path, *ARGV
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ bin_dir = File.expand_path(File.dirname(__FILE__))
4
+ shell_script_path = File.join(bin_dir, 'check-memory-pcnt.sh')
5
+
6
+ exec shell_script_path, *ARGV
@@ -48,7 +48,12 @@ CRIT=${CRIT:=0}
48
48
  #Get total memory available on machine
49
49
  TotalMem=$(free -m | grep Mem | awk '{ print $2 }')
50
50
  #Determine amount of free memory on the machine
51
+ set -o pipefail
51
52
  FreeMem=$(free -m | grep buffers/cache | awk '{ print $4 }')
53
+ if [ $? -ne 0 ];
54
+ then
55
+ FreeMem=$(free -m | grep Mem | awk '{ print $7 }')
56
+ fi
52
57
  #Get percentage of free memory
53
58
  FreePer=$(echo "scale=3; $FreeMem / $TotalMem * 100" | bc -l| cut -d "." -f1)
54
59
  #Get actual memory usage percentage by subtracting free memory percentage from 100
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ bin_dir = File.expand_path(File.dirname(__FILE__))
4
+ shell_script_path = File.join(bin_dir, 'check-swap-percentage.sh')
5
+
6
+ exec shell_script_path, *ARGV
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ bin_dir = File.expand_path(File.dirname(__FILE__))
4
+ shell_script_path = File.join(bin_dir, 'check-swap.sh')
5
+
6
+ exec shell_script_path, *ARGV
@@ -2,7 +2,7 @@ module SensuPluginsMemoryChecks
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- PATCH = 2
5
+ PATCH = 3
6
6
 
7
7
  VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-memory-checks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sensu Plugins and contributors
@@ -30,7 +30,7 @@ cert_chain:
30
30
  8sHuVruarogxxKPBzlL2is4EUb6oN/RdpGx2l4254+nyR+abg//Ed27Ym0PkB4lk
31
31
  HP0m8WSjZmFr109pE/sVsM5jtOCvogyujQOjNVGN4gz1wwPr
32
32
  -----END CERTIFICATE-----
33
- date: 2015-06-04 00:00:00.000000000 Z
33
+ date: 2015-06-29 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: sensu-plugin
@@ -64,14 +64,14 @@ dependencies:
64
64
  name: rubocop
65
65
  requirement: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - "~>"
67
+ - - '='
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0.30'
70
70
  type: :development
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - "~>"
74
+ - - '='
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0.30'
77
77
  - !ruby/object:Gem::Dependency
@@ -177,21 +177,25 @@ email: "<sensu-users@googlegroups.com>"
177
177
  executables:
178
178
  - metrics-memory.rb
179
179
  - metrics-memory-percent.rb
180
- - check-swap.sh
181
- - check-swap-percentage.sh
180
+ - check-swap.rb
181
+ - check-swap-percentage.rb
182
182
  - check-ram.rb
183
- - check-memory-pcnt.sh
184
- - check-mem.sh
183
+ - check-memory-pcnt.rb
184
+ - check-mem.rb
185
185
  extensions: []
186
186
  extra_rdoc_files: []
187
187
  files:
188
188
  - CHANGELOG.md
189
189
  - LICENSE
190
190
  - README.md
191
+ - bin/check-mem.rb
191
192
  - bin/check-mem.sh
193
+ - bin/check-memory-pcnt.rb
192
194
  - bin/check-memory-pcnt.sh
193
195
  - bin/check-ram.rb
196
+ - bin/check-swap-percentage.rb
194
197
  - bin/check-swap-percentage.sh
198
+ - bin/check-swap.rb
195
199
  - bin/check-swap.sh
196
200
  - bin/metrics-memory-percent.rb
197
201
  - bin/metrics-memory.rb
metadata.gz.sig CHANGED
Binary file