sensu-plugins-numa 0.0.1 → 0.0.2

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: 1db066b0bb012a3bb51364ead4be3628c28ad7a4
4
- data.tar.gz: ef1d7095db89fe2e3863cb68867db5a8e94dc63c
3
+ metadata.gz: 10c6ed51483abbcbe83adf70ac8d5bfd427e7dd2
4
+ data.tar.gz: cba50d35291b5c18ed84283e676d6a215e44094f
5
5
  SHA512:
6
- metadata.gz: 8daa265586d67fa8742a168934e85cb14cdb06df1dae23e7005ba5f754e1a353614e6728ea6d95b43aee158886a412ae0470b02ee5f3db022595e2fe052e62a9
7
- data.tar.gz: e131434c9ae1cf8f749efded2177443205cea8109b8763e8debd853d1cb4fbff965db8b7a57b6c9466f4c3a7d1c3cc52375d79eb229b9d169d555d07b61138bf
6
+ metadata.gz: 19d744f08fe1ee37198d6a28a951bd9e6fbe7728a4bd92deedd28a540517a2b3724942caa143b70ffd36115e271a5111aaea827b161f1f3622d0bdb5e32e737b
7
+ data.tar.gz: b2686d65e257c5a5970c822eb1329182ef10e2229c1b3b42d7acb0f601c258462d1a690346342f00f724e6805a481f9d2911d2152264bf670f0c27efcdadbfac
@@ -3,8 +3,13 @@ This project adheres to [Semantic Versioning](http://semver.org/).
3
3
 
4
4
  This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachangelog.com/)
5
5
 
6
- ## Unreleased
6
+ ## [0.0.2] - 2016-01-19
7
+ ### Added
8
+ - Adding command line option to ignore NUMA if running in a virtual machine
7
9
 
8
10
  ## [0.0.1] - 2016-01-05
9
11
  ### Added
10
12
  - Initial release
13
+
14
+ ## Unreleased
15
+
data/README.md CHANGED
@@ -7,6 +7,9 @@ A sensu plugin to monitor whether NUMA is supported and enabled.
7
7
  The plugin accepts the following command line options:
8
8
 
9
9
  ```
10
+ Usage: check-numa.rb (options)
11
+ -w, --warn Warn instead of throwing a critical failure
12
+ --ignore-virtual Ignore NUMA on virtualized hardware
10
13
  ```
11
14
 
12
15
  ## Author
@@ -6,8 +6,15 @@
6
6
  #
7
7
 
8
8
  require 'sensu-plugin/check/cli'
9
+ require 'facter'
9
10
 
10
11
  class CheckNuma < Sensu::Plugin::Check::CLI
12
+ option :ignore_virtual,
13
+ :description => "Ignore NUMA on virtualized hardware",
14
+ :long => "--ignore-virtual",
15
+ :boolean => true,
16
+ :default => false
17
+
11
18
  option :warn,
12
19
  :description => "Warn instead of throwing a critical failure",
13
20
  :short => "-w",
@@ -54,7 +61,9 @@ class CheckNuma < Sensu::Plugin::Check::CLI
54
61
  end
55
62
 
56
63
  def run
57
- if is_supported?()
64
+ if Facter.value('is_virtual') and config[:ignore_virtual]
65
+ ok("NUMA is not supported (Virtual hardware)")
66
+ elsif is_supported?()
58
67
  if @cpuinfo['physicalprocessorcount'] > 1
59
68
  if numa_nodes_count() > 1 and
60
69
  ok("NUMA is enabled")
@@ -2,7 +2,7 @@ module SensuPluginsNuma
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- PATCH = 1
5
+ PATCH = 2
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-numa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matteo Cerutti
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-06 00:00:00.000000000 Z
11
+ date: 2016-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.2.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: facter
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '='
32
+ - !ruby/object:Gem::Version
33
+ version: 2.4.4
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 2.4.4
27
41
  description: This plugin provides facilities for monitoring NUMA
28
42
  email: "<matteo.cerutti@hotmail.co.uk>"
29
43
  executables: