Sha256: 15994a52f5d0685036e187316fc83014f746383b1dfd8b51b4d3de0f7de6480a

Contents?: true

Size: 352 Bytes

Versions: 14

Compression:

Stored size: 352 Bytes

Contents

require 'net/ntp'

interval 60
default[:host] = 'pool.ntp.org'
default[:timeout] = 30

collect do
  event(
    :service     => "ntp #{plugin.host}",
    :desc => "Ntp lag with host #{plugin.host}",
    :metric      => (::Net::NTP.get(plugin.host, 'ntp', plugin.timeout).time.to_f - Time.now.to_f).abs,
    :critical => 0.5,
    :warning => 0.1
  )
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
kurchatov-0.0.5.pre5 examples/ntp.rb
kurchatov-0.0.5.pre4 examples/ntp.rb
kurchatov-0.0.5.pre2 examples/ntp.rb
kurchatov-0.0.5.pre1 examples/ntp.rb
kurchatov-0.0.4 examples/ntp.rb
kurchatov-0.0.4d examples/ntp.rb
kurchatov-0.0.4c examples/ntp.rb
kurchatov-0.0.4b examples/ntp.rb
kurchatov-0.0.3 examples/ntp.rb
kurchatov-0.0.3b examples/ntp.rb
kurchatov-0.0.3a examples/ntp.rb
kurchatov-0.0.2 examples/ntp.rb
kurchatov-0.0.2b examples/ntp.rb
kurchatov-0.0.1 examples/ntp.rb