sensu-plugins-cpu-usage 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 385500e80aa292fccaf05b20a9466e6a400f99a5
4
- data.tar.gz: f9b6f16dcb01722a69ba5554673565b74619e575
3
+ metadata.gz: b4bbb7f54c9a63a1ff45e30b799a8c4ab426a8d6
4
+ data.tar.gz: e24bc9a4d898c053ce40a60835ee778b9c429929
5
5
  SHA512:
6
- metadata.gz: 64882b65518b853d2715b986e9f24b8bf6c468afe09b496b2a955c2c27cee5d2479c17eb376d18bb351014452e67dd5dce9fa12e6babb3a42138e60adbf80ac1
7
- data.tar.gz: 79c7c69f46d2b695a206d76127100865ec95144d68c4de86aec3f5198dc934e05ccce160b8088bea0f6bf6e5c98e18a523685fc6360001d42d32bea5f94d7635
6
+ metadata.gz: 04c65cff28ffc4d7b465471c50139ce6e050b54d4611ce3c617113fb4efe5fed7159d82343d30e5d7a16fb02ee67b88ebdf886f7620339560964a5f1140dec5a
7
+ data.tar.gz: 412251cb5f294fbaa33d26dfe806387be7406a1dc4162e6912b637d79bafc6ce2289a3ddcf74d75ff785be5ba894a2ac9b8330558b4a1a5daf80a041206bac84
data/CHANGELOG.md CHANGED
@@ -5,6 +5,10 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
5
5
 
6
6
  ## Unreleased
7
7
 
8
+ ## [0.0.2] - 2016-01-05
9
+ ### Added
10
+ - Fixed missing round brackets
11
+
8
12
  ## [0.0.1] - 2016-01-05
9
13
  ### Added
10
14
  - Initial release
@@ -143,10 +143,10 @@ class CheckCpuUsage < Sensu::Plugin::Check::CLI
143
143
  check_name = "cpu-usage-#{metric}"
144
144
 
145
145
  if config["warn_#{metric}".to_sym] and config["crit_#{metric}".to_sym]
146
- if config["crit_#{metric}".to_sym] and value >= config["crit_#{metric}".to_sym]
147
- send_critical(check_name, "CPU #{metric} time is too high - Current: #{value}% (>= #{config["crit_#{metric}".to_sym]}%)" if value >= config["crit_#{metric}".to_sym])
148
- elsif config["warn_#{metric}".to_sym] and value >= config["warn_#{metric}".to_sym]
149
- send_warning(check_name, "High CPU #{metric} time - Current: #{value}% (>= #{config["warn_#{metric}".to_sym]}%)" if value >= config["warn_#{metric}".to_sym])
146
+ if value >= config["crit_#{metric}".to_sym]
147
+ send_critical(check_name, "CPU #{metric} time is too high - Current: #{value}% (>= #{config["crit_#{metric}".to_sym]}%)") if value >= config["crit_#{metric}".to_sym])
148
+ elsif value >= config["warn_#{metric}".to_sym]
149
+ send_warning(check_name, "High CPU #{metric} time - Current: #{value}% (>= #{config["warn_#{metric}".to_sym]}%)") if value >= config["warn_#{metric}".to_sym])
150
150
  else
151
151
  send_ok(check_name, "CPU #{metric} time is normal - Current: #{value}% (<= #{config["warn_#{metric}".to_sym]}%)")
152
152
  end
@@ -2,7 +2,7 @@ module SensuPluginsCpuUsage
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,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-plugins-cpu-usage
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