net-ntp-check 0.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 +7 -0
- data/.coveralls.yml +1 -0
- data/.gitignore +34 -0
- data/.rspec +1 -0
- data/.rubocop.yml +1 -0
- data/.rubocop_todo.yml +15 -0
- data/.travis.yml +7 -0
- data/CHANGELOG.md +7 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +59 -0
- data/Rakefile +17 -0
- data/lib/net/ntp/check.rb +21 -0
- data/lib/net/ntp/check/offset.rb +110 -0
- data/lib/net/ntp/check/statsd.rb +68 -0
- data/lib/net/ntp/check/version.rb +11 -0
- data/net-ntp-check.gemspec +30 -0
- data/spec/offset_spec.rb +42 -0
- data/spec/spec_helper.rb +4 -0
- metadata +177 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 9a134604cce5077583f9fb2236aa9c143f79fadb
|
4
|
+
data.tar.gz: 3fc6e593c44f164704a71795a80f40d3adbff86d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6d354cff2e572c728fbbcdcb03a2ff41c6276a2a971ec31daaa8e272175f1f0e0144b3de8b500d99dea1a2c6e5352b16ffbee1e0da8ec9193a2223db1a9e30d6
|
7
|
+
data.tar.gz: 2c0f30bbc3df48b6ddded118c433863d620a5c8c85d5b5033498666ae6a0b1cda170e526b1a842884378c655eba2687cc25cce2730e28b1d99ea1a660322c15d
|
data/.coveralls.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
service_name: travis-ci
|
data/.gitignore
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/test/tmp/
|
9
|
+
/test/version_tmp/
|
10
|
+
/tmp/
|
11
|
+
|
12
|
+
## Specific to RubyMotion:
|
13
|
+
.dat*
|
14
|
+
.repl_history
|
15
|
+
build/
|
16
|
+
|
17
|
+
## Documentation cache and generated files:
|
18
|
+
/.yardoc/
|
19
|
+
/_yardoc/
|
20
|
+
/doc/
|
21
|
+
/rdoc/
|
22
|
+
|
23
|
+
## Environment normalisation:
|
24
|
+
/.bundle/
|
25
|
+
/lib/bundler/man/
|
26
|
+
|
27
|
+
# for a library or gem, you might want to ignore these files since the code is
|
28
|
+
# intended to run in multiple environments; otherwise, check them in:
|
29
|
+
Gemfile.lock
|
30
|
+
# .ruby-version
|
31
|
+
# .ruby-gemset
|
32
|
+
|
33
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
34
|
+
.rvmrc
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/.rubocop.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
data/.rubocop_todo.yml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# This configuration was generated by `rubocop --auto-gen-config`
|
2
|
+
# on 2015-01-23 03:38:36 -0800 using RuboCop version 0.28.0.
|
3
|
+
# The point is for the user to remove these configuration records
|
4
|
+
# one by one as the offenses are removed from the code base.
|
5
|
+
# Note that changes in the inspected code, or installation of new
|
6
|
+
# versions of RuboCop, may require this file to be generated again.
|
7
|
+
|
8
|
+
# Offense count: 2
|
9
|
+
Metrics/AbcSize:
|
10
|
+
Max: 21
|
11
|
+
|
12
|
+
# Offense count: 2
|
13
|
+
# Configuration parameters: CountComments.
|
14
|
+
Metrics/MethodLength:
|
15
|
+
Max: 19
|
data/.travis.yml
ADDED
data/CHANGELOG.md
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 PagerDuty, Inc.
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
22
|
+
|
data/README.md
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
# Net::Ntp::Check
|
2
|
+
|
3
|
+
[](https://travis-ci.org/PagerDuty/net-ntp-check)
|
4
|
+
[](https://rubygems.org/gems/net-ntp-check)
|
5
|
+
[](https://coveralls.io/r/PagerDuty/net-ntp-check?branch=master)
|
6
|
+
[](https://codeclimate.com/github/PagerDuty/net-ntp-check)
|
7
|
+
|
8
|
+
Checks NTP offset against several NTP servers and allows pushing of offset stats via statsd
|
9
|
+
|
10
|
+
## Installation
|
11
|
+
|
12
|
+
Add this line to your application's Gemfile:
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
gem 'net-ntp-check'
|
16
|
+
```
|
17
|
+
|
18
|
+
And then execute:
|
19
|
+
|
20
|
+
$ bundle
|
21
|
+
|
22
|
+
Or install it yourself as:
|
23
|
+
|
24
|
+
$ gem install net-ntp-check
|
25
|
+
|
26
|
+
## Usage
|
27
|
+
|
28
|
+
### Get NTP offsets based on several servers
|
29
|
+
```ruby
|
30
|
+
require 'net/ntp/check'
|
31
|
+
offsets = Net::NTP::Check.get_offsets
|
32
|
+
```
|
33
|
+
|
34
|
+
### Get NTP offset based on several servers with a 200ms bandpass filter applied
|
35
|
+
```ruby
|
36
|
+
require 'net/ntp/check'
|
37
|
+
offsets = Net::NTP::Check.get_offsets_filtered
|
38
|
+
```
|
39
|
+
|
40
|
+
### Send NTP offset to statsd
|
41
|
+
```ruby
|
42
|
+
require 'net/ntp/check'
|
43
|
+
client = Net::NTP::Check::StatsdClient.new
|
44
|
+
client.send_offset_stats
|
45
|
+
```
|
46
|
+
|
47
|
+
#### Statsd Error Codes
|
48
|
+
- 0 - Success
|
49
|
+
- 1 - Unknown Error
|
50
|
+
- 2 - Timeout Error
|
51
|
+
- 3 - Socket Error (failed DNS resolution)
|
52
|
+
|
53
|
+
## Contributing
|
54
|
+
|
55
|
+
1. Fork it ( https://github.com/pagerduty/net-ntp-check/fork )
|
56
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
57
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
58
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
59
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'rubocop/rake_task'
|
3
|
+
require 'rspec/core/rake_task'
|
4
|
+
|
5
|
+
RSpec::Core::RakeTask.new(:spec)
|
6
|
+
|
7
|
+
desc 'Run all linters on the codebase'
|
8
|
+
task :linters do
|
9
|
+
Rake::Task['rubocop'].invoke
|
10
|
+
end
|
11
|
+
|
12
|
+
desc 'rubocop compliancy checks'
|
13
|
+
RuboCop::RakeTask.new(:rubocop) do |t|
|
14
|
+
t.patterns = %w( lib/**/*.rb lib/*.rb spec/*.rb )
|
15
|
+
end
|
16
|
+
|
17
|
+
task default: [:linters, :spec]
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'logger'
|
2
|
+
|
3
|
+
require 'net/ntp/check/version'
|
4
|
+
require 'net/ntp/check/offset'
|
5
|
+
require 'net/ntp/check/statsd'
|
6
|
+
|
7
|
+
module Net
|
8
|
+
module NTP
|
9
|
+
###
|
10
|
+
# = Overview
|
11
|
+
#
|
12
|
+
# Net::NTP::Check checks NTP offset against several NTP servers
|
13
|
+
module Check
|
14
|
+
def self.logger
|
15
|
+
@logger ||= Logger.new(STDOUT).tap do |l|
|
16
|
+
l.level = Logger::INFO
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,110 @@
|
|
1
|
+
require 'net/ntp'
|
2
|
+
|
3
|
+
module Net
|
4
|
+
module NTP
|
5
|
+
###
|
6
|
+
# = Overview
|
7
|
+
#
|
8
|
+
# Contains Net::NTP::Check offset checks
|
9
|
+
module Check
|
10
|
+
# Default servers to check against
|
11
|
+
DEFAULT_SERVERS = [
|
12
|
+
'0.pool.ntp.org',
|
13
|
+
'1.pool.ntp.org',
|
14
|
+
'2.pool.ntp.org',
|
15
|
+
'3.pool.ntp.org'
|
16
|
+
]
|
17
|
+
|
18
|
+
# Default timeout for the NTP requests
|
19
|
+
TIMEOUT = Net::NTP::TIMEOUT
|
20
|
+
|
21
|
+
# Get the time offsets against the given host list with a
|
22
|
+
# bandpass filter applied
|
23
|
+
def self.get_offsets_filtered(hosts = DEFAULT_SERVERS, timeout = TIMEOUT)
|
24
|
+
offsets = []
|
25
|
+
hosts_multiplier = (9.0 / hosts.length).ceil
|
26
|
+
Net::NTP::Check.logger.debug("Hosts given: #{hosts}")
|
27
|
+
Net::NTP::Check.logger.debug("Hosts multiplier: #{hosts_multiplier}")
|
28
|
+
hosts_multiplier.times do
|
29
|
+
offsets.push(get_offsets(hosts, timeout))
|
30
|
+
sleep(0.01) # sleep to keep from getting rate limted
|
31
|
+
end
|
32
|
+
AutoBandPass.filter(offsets.flatten.shuffle[0...9])
|
33
|
+
end
|
34
|
+
|
35
|
+
# Get the time offsets against the given host list
|
36
|
+
def self.get_offsets(hosts = DEFAULT_SERVERS, timeout = TIMEOUT)
|
37
|
+
offsets = []
|
38
|
+
|
39
|
+
Net::NTP::Check.logger.debug("Host list: #{hosts}")
|
40
|
+
|
41
|
+
hosts.each do |host|
|
42
|
+
offsets.push(get_offset(host, timeout))
|
43
|
+
end
|
44
|
+
offsets
|
45
|
+
end
|
46
|
+
|
47
|
+
# Get the time offset against the given host
|
48
|
+
def self.get_offset(host = DEFAULT_SERVERS[0], timeout = TIMEOUT)
|
49
|
+
get_host_data(host, timeout)[0].offset
|
50
|
+
end
|
51
|
+
|
52
|
+
private
|
53
|
+
|
54
|
+
# Do the NTP request and catch exceptions
|
55
|
+
def self.get_host_data(host, timeout = TIMEOUT)
|
56
|
+
t = Net::NTP.get(host, 'ntp', timeout)
|
57
|
+
delay = (t.client_time_receive - t.originate_timestamp) -
|
58
|
+
(t.transmit_timestamp - t.receive_timestamp)
|
59
|
+
msg = "Received NTP data for #{host} with ntp delay of #{delay}"
|
60
|
+
Net::NTP::Check.logger.debug(msg)
|
61
|
+
return t, delay
|
62
|
+
rescue SocketError
|
63
|
+
err_msg = "Unable to resolve #{host}"
|
64
|
+
Net::NTP::Check.logger.debug(err_msg)
|
65
|
+
raise SocketError, err_msg
|
66
|
+
rescue NoMethodError, Timeout::Error
|
67
|
+
# need to catch NoMethodError pending bug fix
|
68
|
+
# https://github.com/zencoder/net-ntp/pull/9
|
69
|
+
err_msg = "Connection timed out to #{host}"
|
70
|
+
Net::NTP::Check.logger.debug(err_msg)
|
71
|
+
raise Timeout::Error, err_msg
|
72
|
+
end
|
73
|
+
|
74
|
+
# The filtering works like this:
|
75
|
+
# This assumes you are passing in a 9 length Array. Other lengths
|
76
|
+
# may work, but YMMV. This then gets the average of the middle three
|
77
|
+
# of the sorted Array. Using this average, and an arbitrary range
|
78
|
+
# (+/- 200ms), we delete any values outside of that range. This
|
79
|
+
# effectively is a lazy-man's band-pass filter.
|
80
|
+
class AutoBandPass
|
81
|
+
FILTER_RANGE = 0.2
|
82
|
+
|
83
|
+
def self.filter(values)
|
84
|
+
v = values.sort
|
85
|
+
Net::NTP::Check.logger.debug("AutoBandPass values: #{v}")
|
86
|
+
middle = values.length / 2.0
|
87
|
+
middle.ceil unless values.length % 2
|
88
|
+
avg = average(v[(middle - 1).floor..(middle + 1).floor])
|
89
|
+
Net::NTP::Check.logger.debug("AutoBandPass mid values avg: #{avg}")
|
90
|
+
v = apply_band(v, avg)
|
91
|
+
Net::NTP::Check.logger.debug("AutoBandPass values with filter: #{v}")
|
92
|
+
average(v)
|
93
|
+
end
|
94
|
+
|
95
|
+
def self.apply_band(values, average)
|
96
|
+
values.dup.each do |o|
|
97
|
+
upper_bound = (average + FILTER_RANGE)
|
98
|
+
lower_bound = (average - FILTER_RANGE)
|
99
|
+
values.delete(o) if o < lower_bound || o > upper_bound
|
100
|
+
end
|
101
|
+
values
|
102
|
+
end
|
103
|
+
|
104
|
+
def self.average(values)
|
105
|
+
values.reduce { |a, e| a + e } / values.length.to_f
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
require 'statsd'
|
2
|
+
require 'net/ntp/check/offset'
|
3
|
+
|
4
|
+
module Net
|
5
|
+
module NTP
|
6
|
+
module Check
|
7
|
+
###
|
8
|
+
# = Overview
|
9
|
+
#
|
10
|
+
# Sends Net::NTP::Check offset data to statsd
|
11
|
+
class StatsdClient
|
12
|
+
DEFAULT_STATSD_HOST = 'localhost'
|
13
|
+
DEFAULT_STATSD_PORT = 8125
|
14
|
+
DEFAULT_STATSD_GAUGE_BASE = 'net.ntp.check'
|
15
|
+
DEFAULT_TIMEOUT = 5
|
16
|
+
|
17
|
+
def initialize(opts = {})
|
18
|
+
@stats = {}
|
19
|
+
@statsd_host = opts.fetch(:statsd_host, DEFAULT_STATSD_HOST)
|
20
|
+
@statsd_port = opts.fetch(:statsd_port, DEFAULT_STATSD_PORT)
|
21
|
+
@statsd_gauge_base = opts.fetch(:statsd_gauge_base,
|
22
|
+
DEFAULT_STATSD_GAUGE_BASE)
|
23
|
+
@ntp_timeout = opts.fetch(:ntp_timeout, DEFAULT_TIMEOUT)
|
24
|
+
@ntp_hosts = opts.fetch(:ntp_hosts,
|
25
|
+
Net::NTP::Check::DEFAULT_SERVERS)
|
26
|
+
@statsd = Statsd.new(@statsd_host, @statsd_port)
|
27
|
+
end
|
28
|
+
|
29
|
+
def send_offset_stats
|
30
|
+
err_code = 0
|
31
|
+
offset_stats!
|
32
|
+
@statsd.gauge("#{@statsd_gauge_base}.offset_s",
|
33
|
+
@stats[:offset])
|
34
|
+
@statsd.gauge("#{@statsd_gauge_base}.offset_ms",
|
35
|
+
@stats[:offset_in_ms])
|
36
|
+
|
37
|
+
rescue SocketError => e
|
38
|
+
err_code = 3
|
39
|
+
|
40
|
+
rescue Timeout::Error => e
|
41
|
+
err_code = 2
|
42
|
+
|
43
|
+
rescue StandardError => e
|
44
|
+
err_code = 1
|
45
|
+
ensure
|
46
|
+
@statsd.gauge("#{@statsd_gauge_base}.err", err_code)
|
47
|
+
warn 'Problem running Net::NTP::Check::StatsdClient stats '\
|
48
|
+
"gathering: #{e.message} (error code #{err_code})" unless
|
49
|
+
err_code == 0
|
50
|
+
warn e.backtrace.join("\n") if err_code == 1
|
51
|
+
exit err_code unless err_code == 0
|
52
|
+
end
|
53
|
+
|
54
|
+
private
|
55
|
+
|
56
|
+
def offset_stats!
|
57
|
+
stats_data_filtered = Net::NTP::Check.get_offsets_filtered(
|
58
|
+
@ntp_hosts, @ntp_timeout)
|
59
|
+
msg = "stats_data_filtered: #{stats_data_filtered}"
|
60
|
+
Net::NTP::Check.logger.debug(msg)
|
61
|
+
@stats[:offset] = stats_data_filtered
|
62
|
+
@stats[:offset_in_ms] = @stats[:offset] * 1000
|
63
|
+
Net::NTP::Check.logger.debug("stats: #{@stats}")
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'net/ntp/check/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'net-ntp-check'
|
8
|
+
spec.version = Net::NTP::Check::VERSION
|
9
|
+
spec.authors = ['Grant Ridder']
|
10
|
+
spec.email = ['shortdudey123@gmail.com']
|
11
|
+
spec.summary = 'NTP offset check'
|
12
|
+
spec.description = 'Checks NTP offset against several NTP servers and allows pushing of offset stats via statsd'
|
13
|
+
spec.license = 'MIT'
|
14
|
+
spec.homepage = ''
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ['lib']
|
20
|
+
|
21
|
+
spec.add_dependency 'net-ntp'
|
22
|
+
spec.add_dependency 'statsd-ruby'
|
23
|
+
|
24
|
+
spec.add_development_dependency 'bundler', '~> 1.7'
|
25
|
+
spec.add_development_dependency 'rake'
|
26
|
+
spec.add_development_dependency 'rspec'
|
27
|
+
spec.add_development_dependency 'rubocop'
|
28
|
+
spec.add_development_dependency 'pry'
|
29
|
+
spec.add_development_dependency 'coveralls'
|
30
|
+
end
|
data/spec/offset_spec.rb
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe 'Net::NTP::Check' do
|
4
|
+
let(:result) { Net::NTP::Check.get_offsets_filtered }
|
5
|
+
|
6
|
+
it 'should throw an exception if the connection times out' do
|
7
|
+
expect { Net::NTP::Check.get_offset('www.google.com', 1) }.to raise_error
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'should throw an exception if the hostname can not be resolved' do
|
11
|
+
expect { Net::NTP::Check.get_offset('nosuchhost') }.to raise_error
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'should get_offsets_filtered to return a float' do
|
15
|
+
expect(result).to be_a Float
|
16
|
+
end
|
17
|
+
|
18
|
+
context 'AutoBandPass' do
|
19
|
+
it 'should return the correct values with an even number of values' do
|
20
|
+
values = (1..9).to_a
|
21
|
+
filter_results = Net::NTP::Check::AutoBandPass.filter(values)
|
22
|
+
expect(filter_results).to eq(5.0)
|
23
|
+
end
|
24
|
+
it 'should return the correct values with an odd number of values' do
|
25
|
+
values = (1..10).to_a
|
26
|
+
filter_results = Net::NTP::Check::AutoBandPass.filter(values)
|
27
|
+
expect(filter_results).to eq(6.0)
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'should return the correct values with unevenly spaced input' do
|
31
|
+
values = [0.15, 0.2, 0.3, 0.4, 0.49, 0.6, 0.7, 0.8, 0.95]
|
32
|
+
filter_results = Net::NTP::Check::AutoBandPass.filter(values)
|
33
|
+
expect(filter_results).to eq(0.4475)
|
34
|
+
end
|
35
|
+
|
36
|
+
it 'should not return the middle value for unevenly spaced numbers' do
|
37
|
+
values = [0.15, 0.2, 0.3, 0.4, 0.49, 0.6, 0.7, 0.8, 0.95]
|
38
|
+
filter_results = Net::NTP::Check::AutoBandPass.filter(values)
|
39
|
+
expect(filter_results).to_not eq(0.49)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,177 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: net-ntp-check
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Grant Ridder
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-01-23 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: net-ntp
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: statsd-ruby
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.7'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.7'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: pry
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: coveralls
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
description: Checks NTP offset against several NTP servers and allows pushing of offset
|
126
|
+
stats via statsd
|
127
|
+
email:
|
128
|
+
- shortdudey123@gmail.com
|
129
|
+
executables: []
|
130
|
+
extensions: []
|
131
|
+
extra_rdoc_files: []
|
132
|
+
files:
|
133
|
+
- ".coveralls.yml"
|
134
|
+
- ".gitignore"
|
135
|
+
- ".rspec"
|
136
|
+
- ".rubocop.yml"
|
137
|
+
- ".rubocop_todo.yml"
|
138
|
+
- ".travis.yml"
|
139
|
+
- CHANGELOG.md
|
140
|
+
- Gemfile
|
141
|
+
- LICENSE
|
142
|
+
- README.md
|
143
|
+
- Rakefile
|
144
|
+
- lib/net/ntp/check.rb
|
145
|
+
- lib/net/ntp/check/offset.rb
|
146
|
+
- lib/net/ntp/check/statsd.rb
|
147
|
+
- lib/net/ntp/check/version.rb
|
148
|
+
- net-ntp-check.gemspec
|
149
|
+
- spec/offset_spec.rb
|
150
|
+
- spec/spec_helper.rb
|
151
|
+
homepage: ''
|
152
|
+
licenses:
|
153
|
+
- MIT
|
154
|
+
metadata: {}
|
155
|
+
post_install_message:
|
156
|
+
rdoc_options: []
|
157
|
+
require_paths:
|
158
|
+
- lib
|
159
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
160
|
+
requirements:
|
161
|
+
- - ">="
|
162
|
+
- !ruby/object:Gem::Version
|
163
|
+
version: '0'
|
164
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
165
|
+
requirements:
|
166
|
+
- - ">="
|
167
|
+
- !ruby/object:Gem::Version
|
168
|
+
version: '0'
|
169
|
+
requirements: []
|
170
|
+
rubyforge_project:
|
171
|
+
rubygems_version: 2.2.2
|
172
|
+
signing_key:
|
173
|
+
specification_version: 4
|
174
|
+
summary: NTP offset check
|
175
|
+
test_files:
|
176
|
+
- spec/offset_spec.rb
|
177
|
+
- spec/spec_helper.rb
|