bin/riemann-health in riemann-tools-0.2.0 vs bin/riemann-health in riemann-tools-0.2.1
- old
+ new
@@ -161,10 +161,10 @@
@old_cpu = [u2, n2, s2, t2, i2]
end
def freebsd_load
- m = `uptime`.split[0].match(/^[0-9]*\.[0-9]*$/)
+ m = `uptime`.split(':')[-1].chomp.gsub(/\s+/,'').split(',')
load = m[0].to_f / @cores
if load > @limits[:load][:critical]
alert "load", :critical, load, "1-minute load average/core is #{load}"
elsif load > @limits[:load][:warning]
alert "load", :warning, load, "1-minute load average/core is #{load}"