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.4.7 examples/ntp.rb
kurchatov-0.4.6 examples/ntp.rb
kurchatov-0.4.5 examples/ntp.rb
kurchatov-0.4.4 examples/ntp.rb
kurchatov-0.4.3 examples/ntp.rb
kurchatov-0.4.2 examples/ntp.rb
kurchatov-0.4.1 examples/ntp.rb
kurchatov-0.3.8 examples/ntp.rb
kurchatov-0.3.7 examples/ntp.rb
kurchatov-0.3.6 examples/ntp.rb
kurchatov-0.3.5 examples/ntp.rb
kurchatov-0.3.4 examples/ntp.rb
kurchatov-0.3.3 examples/ntp.rb
kurchatov-0.3.2 examples/ntp.rb
kurchatov-0.3.1 examples/ntp.rb
kurchatov-0.3.0 examples/ntp.rb
kurchatov-0.2.9 examples/ntp.rb
kurchatov-0.2.8 examples/ntp.rb
kurchatov-0.2.7 examples/ntp.rb
kurchatov-0.2.6 examples/ntp.rb