Sha256: 1f49460b10ef276209200085b3969300eb58fb44f62c49c730598b7df3cf896a

Contents?: true

Size: 353 Bytes

Versions: 51

Compression:

Stored size: 353 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

51 entries across 51 versions & 1 rubygems

Version Path
kurchatov-0.0.7 examples/ntp.rb
kurchatov-0.0.7.pre.3 examples/ntp.rb
kurchatov-0.0.7.pre.2 examples/ntp.rb
kurchatov-0.0.7.pre.1 examples/ntp.rb
kurchatov-0.0.6 examples/ntp.rb
kurchatov-0.0.6.pre.5 examples/ntp.rb
kurchatov-0.0.6.pre.4 examples/ntp.rb
kurchatov-0.0.6.pre.3 examples/ntp.rb
kurchatov-0.0.6.pre.2 examples/ntp.rb
kurchatov-0.0.6.pre.1 examples/ntp.rb
kurchatov-0.0.5 examples/ntp.rb