Sha256: 4293b9cb2bf8b55a304181a93e75d83534dc745009f1830e77ea5de41b422762

Contents?: true

Size: 258 Bytes

Versions: 51

Compression:

Stored size: 258 Bytes

Contents

interval 60
always_start true

collect :os => 'linux' do
  event(
      :metric => File.read('/proc/uptime').split(' ').first.to_f
  )
end

collect :os => 'darwin' do
  event(
      :metric => shell("sysctl -n kern.boottime | awk '{print $4}'").to_f
  )
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
kurchatov-0.4.7 examples/uptime.rb
kurchatov-0.4.6 examples/uptime.rb
kurchatov-0.4.5 examples/uptime.rb
kurchatov-0.4.4 examples/uptime.rb
kurchatov-0.4.3 examples/uptime.rb
kurchatov-0.4.2 examples/uptime.rb
kurchatov-0.4.1 examples/uptime.rb
kurchatov-0.3.8 examples/uptime.rb
kurchatov-0.3.7 examples/uptime.rb
kurchatov-0.3.6 examples/uptime.rb
kurchatov-0.3.5 examples/uptime.rb
kurchatov-0.3.4 examples/uptime.rb
kurchatov-0.3.3 examples/uptime.rb
kurchatov-0.3.2 examples/uptime.rb
kurchatov-0.3.1 examples/uptime.rb
kurchatov-0.3.0 examples/uptime.rb
kurchatov-0.2.9 examples/uptime.rb
kurchatov-0.2.8 examples/uptime.rb
kurchatov-0.2.7 examples/uptime.rb
kurchatov-0.2.6 examples/uptime.rb