sensu-plugins-chrony 0.0.6 → 0.0.7

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: b1dba0384b7b0f850b7a3cb9a2c4ae3973c60cad
4
- data.tar.gz: 304698688161bbf3f2c9271fe0e971fd0833c56b
3
+ metadata.gz: 2defe7d9f370b45a0127afc920c1d11e36327928
4
+ data.tar.gz: 8d4023c9d8c1b886684b5595628f37bfa4faea4d
5
5
  SHA512:
6
- metadata.gz: 8a04459de83f978fff3111586efb8d271866f1b069d6060a3ad2dd277e8acd3dac61dd117e7183c08b41ad3b9e11939252e74a74159541f7df481ff1617419ea
7
- data.tar.gz: 5fe56a626723df140aba66ec282e79af1c1a701d4df5c5497f4dc4412f858800e81477e35935901e683436eedcdc732cb0a62a720ecf15eaac8cf12e50b39c46
6
+ metadata.gz: 73a41db5635c5f43ce5bb9a13d892f171365a5c48fd258de25c696a30f4bef95a861d2fb051f777db23b4305856cfbcb67019279b9b9cdecc5a98812a4621480
7
+ data.tar.gz: b9def55d9374e66b3d2790acf1a450b1729a59d91cb342d7faac45bf5b47c9dfa38e68a35d9498b9f08dc5c9afa0dc5f2ab4d868793979f8be495abb6b79cb8b
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.7] - 2016-01-18
9
+ ### Added
10
+ - fixing regex
11
+
8
12
  ## [0.0.6] - 2016-01-18
9
13
  ### Added
10
14
  - last offset regex should match both - and +
data/bin/check-chrony.rb CHANGED
@@ -94,7 +94,7 @@ class CheckChrony < Sensu::Plugin::Check::CLI
94
94
  case line.downcase
95
95
  when /^stratum\s*:\s*(\d+)$/
96
96
  stratum = $1.to_i
97
- when /^last offset\s*:\s*([-+]?[.\d]+)\s*seconds$/
97
+ when /^last offset\s*:\s*([\-\+]?[.\d]+)\s*seconds$/
98
98
  # convert from seconds to milliseconds
99
99
  offset = $1.to_f * 1000
100
100
  when /^leap status\s*:\s*(.*?)$/
@@ -102,8 +102,8 @@ class CheckChrony < Sensu::Plugin::Check::CLI
102
102
  end
103
103
  end
104
104
 
105
+ check_name = "chrony-stratum"
105
106
  if stratum
106
- check_name = "chrony-stratum"
107
107
  msg = "NTP stratum is #{stratum}"
108
108
 
109
109
  if stratum >= config[:crit_stratum]
@@ -119,8 +119,8 @@ class CheckChrony < Sensu::Plugin::Check::CLI
119
119
  send_unknown(check_name, "Failed to look up NTP stratum")
120
120
  end
121
121
 
122
+ check_name = "chrony-offset"
122
123
  if offset
123
- check_name = "chrony-offset"
124
124
  msg = "NTP offset is #{offset.round(4)}ms"
125
125
 
126
126
  if offset >= config[:crit_offset] or offset <= -config[:crit_offset]
@@ -2,7 +2,7 @@ module SensuPluginsChrony
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- PATCH = 6
5
+ PATCH = 7
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-chrony
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matteo Cerutti