cloud66_agent 1.4.2 → 1.4.3

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
  SHA256:
3
- metadata.gz: 2614a894191fbe93447c7eda84c7989a885f3f5751b4939d06f4ed83799d84ab
4
- data.tar.gz: 637569776ba67444eff2a18da883db2e895731b21d35296789ba2daf53e2644a
3
+ metadata.gz: 602e5d7b7ef1bff2dfb6b2bb5859c9c5ded474956495762ed7f7ce466f853fa2
4
+ data.tar.gz: b3debd77d32cc3563efe69a46f9b9230ad01f746015adbe4696d7864e7ecae94
5
5
  SHA512:
6
- metadata.gz: d74685e6b4349150d5c116b5e0ef14209f4a30b6a94f65dc08db6756791a1ced6750cfad16531bc2883c4db28bdf3fbb60868e6cf3729be89888546a245bdf5d
7
- data.tar.gz: a3c2cee9356ef4c843fcaf50f21284ad12858428ff30e99794fe0f4eee1b6fdbfd4c7af947fe8977ceea6e60fdb14e7deaa3327600bab28b654ecd1b00cec72b
6
+ metadata.gz: 9851b91161ee5cf3925d835abb753d42bb3f64252df70fa41c6922b77c4107388a451375915b8491f8d2b72a0eab5310beba5ce548c2992c6d05a3f5f6c35d71
7
+ data.tar.gz: 27875862679ac52871d0cefb1e30a75f5864a7ddf3323dfa4b1b5d729dc4292b5f0c174a6978a761edb38ccbbccae5f3394d8ea6adbf4b1700af6f87063b9ce7
@@ -13,7 +13,7 @@ module Cloud66
13
13
  # Defines the minor version
14
14
  # PATCH:
15
15
  # Defines the patch version
16
- MAJOR, MINOR, PATCH = 1, 4, 2
16
+ MAJOR, MINOR, PATCH = 1, 4, 3
17
17
 
18
18
  #ie. PRERELEASE_MODIFIER = 'beta1' or nil
19
19
  PRERELEASE_MODIFIER = nil
@@ -81,6 +81,10 @@ module Cloud66
81
81
  end
82
82
 
83
83
  def self.calculate_space_alerts(warning_threshold, critical_threshold)
84
+ $logger.info "Calculating Disk Alerts [warning_threshold:#{warning_threshold}] [critical_threshold:#{critical_threshold}]"
85
+ warning_threshold = warning_threshold.to_i
86
+ critical_threshold = critical_threshold.to_i
87
+
84
88
  space_alerts = []
85
89
  return space_alerts if warning_threshold == 0 || critical_threshold == 0
86
90
  # get the df output (linux only)
@@ -91,9 +95,10 @@ module Cloud66
91
95
  filesystem = parts[0].strip
92
96
  mounted = parts[1].strip
93
97
  percentage = parts[2].strip.gsub(/%/, '').to_i
98
+ next if percentage < 1
94
99
  if percentage >= critical_threshold
95
100
  space_alerts << {level: :critical, filesystem: filesystem, mounted: mounted, percentage: percentage}
96
- elsif percentage > warning_threshold
101
+ elsif percentage >= warning_threshold
97
102
  space_alerts << {level: :warning, filesystem: filesystem, mounted: mounted, percentage: percentage}
98
103
  end
99
104
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloud66_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.2
4
+ version: 1.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cloud 66