sensu-plugins-ntp 1.0.0 → 1.0.1

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: 1719742cd55759cf40370fad39fc2a28533a6e47
4
- data.tar.gz: 33d75e09c5732fe500fc9fc98ffd522785eff3b0
3
+ metadata.gz: ad4217c7774247a2a1631a5b74f68e10af5bbf6d
4
+ data.tar.gz: eccd843778e5f946570204006699f1c23b8b4fe1
5
5
  SHA512:
6
- metadata.gz: 72058e4cfd6e3443838d8d7418f8bf906ef8fbd6e92af5cf18c3c80c43355116d259635fcdd788c53eddff9ad9d28e10755779cb06a9fbf054846033124da088
7
- data.tar.gz: d829f9d1da934c6d7940ddbd4371e5453e8278ff86fe7958753d2add66a6f7eb7afe2b6f701e1e193d3dd251c56a55b75025e31d53e6d987260a4a41404d358b
6
+ metadata.gz: 9aec9e0f7b54a036bb3f61adcd5e2c6b40beb54ed6bc9884dadefa17144b7a3c45dd71d884b26da1fa3de9da2c3be6e9e373e336d008d8cce234a20df6311ef6
7
+ data.tar.gz: 6a9477ae6b646a230dd0c8b6224005ee65cadb6ba58d1649d17fbec81d278833d9dfd01c2a177ceaf7e43feddf05136c584f8233f5e09c692541a26b76f05107
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
+ ## [1.0.1] - 2016-12-30
9
+ ### Fixed
10
+ - Fix interpretation of the leap field in check-ntp.rb (@corro)
11
+
8
12
  ## [1.0.0] - 2016-07-13
9
13
  ### Added
10
14
  - Added check for unsynced NTP state with configurable severity, returns unknown by default.
@@ -38,7 +42,8 @@ This CHANGELOG follows the format listed at [Keep A Changelog](http://keepachang
38
42
  ### Added
39
43
  - initial release
40
44
 
41
- [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-ntp/compare/1.0.0...HEAD
45
+ [Unreleased]: https://github.com/sensu-plugins/sensu-plugins-ntp/compare/1.0.1...HEAD
46
+ [1.0.1]: https://github.com/sensu-plugins/sensu-plugins-ntp/compare/1.0.0...1.0.1
42
47
  [1.0.0]: https://github.com/sensu-plugins/sensu-plugins-ntp/compare/0.0.4...1.0.0
43
48
  [0.0.4]: https://github.com/sensu-plugins/sensu-plugins-ntp/compare/0.0.3...0.0.4
44
49
  [0.0.3]: https://github.com/sensu-plugins/sensu-plugins-ntp/compare/0.0.2...0.0.3
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## Sensu-Plugins-ntp
1
+ ## sensu-plugins-ntp
2
2
 
3
3
  [ ![Build Status](https://travis-ci.org/sensu-plugins/sensu-plugins-ntp.svg?branch=master)](https://travis-ci.org/sensu-plugins/sensu-plugins-ntp)
4
4
  [![Gem Version](https://badge.fury.io/rb/sensu-plugins-ntp.svg)](http://badge.fury.io/rb/sensu-plugins-ntp)
@@ -8,16 +8,62 @@
8
8
 
9
9
  ## Functionality
10
10
 
11
- ## Files
12
- * bin/check-ntp.rb
13
- * bin/metrics-ntpdate.rb
14
- * bin/metrics-ntpstats.rb
11
+ Provides plugins for checking and measuring Network Time Protocol (NTP)
12
+ servers.
15
13
 
16
14
  ## Usage
17
15
 
18
- ## Installation
16
+ ### check-ntp.rb
17
+
18
+ Check the synchronization state of the local NTP server.
19
+
20
+ **parameters:**
21
+
22
+ - `warn`: Maximum offset in ms for warning state (default: `10`)
23
+ - `crit`: Maximum offset in ms for critical state (default: `100`)
24
+ - `stratum`: Maximum stratum value (default: `15`)
25
+ - `unsynced_status`: Default status when unsynced (default: `UNKNOWN`)
26
+
27
+
28
+ ### metrics-ntpdate.rb
29
+
30
+ Get metrics from ntpdate.
31
+
32
+ **parameters:**
33
+
34
+ - `server`: Comma separated list of NTP server(s) to measure (default:
35
+ `localhost`)
36
+ - `scheme`: Prefix for metrics (default: `hostname`)
19
37
 
20
- [Installation and Setup](http://sensu-plugins.io/docs/installation_instructions.html)
38
+ **values:**
21
39
 
40
+ - `offset`: Time difference between server and source (unit: ms)
41
+ - `delay`: Roundtrip time from server to source (unit: ms)
42
+
43
+ ### metrics-ntpstats.rb
44
+
45
+ Get metrics from ntpstats.
46
+
47
+ **parameters:**
48
+
49
+ - `host`: Target host (default: `localhost`)
50
+ - `scheme`: Prefix for metrics (default: `hostname`)
51
+
52
+ **values:**
53
+
54
+ Descriptions taken from https://www.eecis.udel.edu/~mills/ntp/html/ntpq.html.
55
+
56
+ - `clk_jitter`: Clock jitter
57
+ - `clk_wander`: Clock frequency wander
58
+ - `frequency`: Frequency offset relative to hardware clock
59
+ - `mintc`: Minimum time constant
60
+ - `offset`: Combined offset of server relative to this host
61
+ - `stratum`: Stratum
62
+ - `sys_jitter`: Combined system jitter
63
+ - `tc`: Time constant and poll exponent
64
+
65
+ ## Installation
22
66
 
23
- ## Notes
67
+ ```plain
68
+ sensu-install --plugin sensu-plugins-ntp
69
+ ```
data/bin/check-ntp.rb CHANGED
@@ -62,7 +62,7 @@ class CheckNTP < Sensu::Plugin::Check::CLI
62
62
  output = `ntpq -c "rv 0 stratum,offset"`.split("\n").find { |line| line.start_with?('stratum') }
63
63
  stratum = output.split(',')[0].split('=')[1].strip.to_i
64
64
  offset = output.split(',')[1].split('=')[1].strip.to_f
65
- source_field_status = config[:unsynced_status] == 'ok' ? 6 : /status=[0-3]([0-9])[0-9a-f]{2}/.match(`ntpq -c "rv 0"`)[1].to_i
65
+ source_field_status = config[:unsynced_status] == 'ok' ? 6 : /status=[0-9a-f]([0-9])[0-9a-f]{2}/.match(`ntpq -c "rv 0"`)[1].to_i
66
66
  rescue
67
67
  unknown 'NTP command Failed'
68
68
  end
@@ -2,7 +2,7 @@ module SensuPluginsNtp
2
2
  module Version
3
3
  MAJOR = 1
4
4
  MINOR = 0
5
- PATCH = 0
5
+ PATCH = 1
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-ntp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sensu-Plugins and contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-14 00:00:00.000000000 Z
11
+ date: 2016-12-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sensu-plugin
@@ -196,9 +196,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
196
196
  version: '0'
197
197
  requirements: []
198
198
  rubyforge_project:
199
- rubygems_version: 2.5.1
199
+ rubygems_version: 2.4.5
200
200
  signing_key:
201
201
  specification_version: 4
202
202
  summary: Sensu plugins for ntp
203
203
  test_files: []
204
- has_rdoc: