lib/riemann/babbler/plugins/selfupdate.rb in riemann-babbler-1.0.5.5 vs lib/riemann/babbler/plugins/selfupdate.rb in riemann-babbler-1.0.5.6

- old
+ new

@@ -6,10 +6,10 @@ plugin.set_default(:service, 'self update') plugin.set_default(:file, '/var/run/status') end def collect - json = JSON.parse File.read(plugin.url) + json = JSON.parse File.read(plugin.file) if json["status"] == "ok" {:service => plugin.service, :description => "Self update status in #{plugin.file}, state: OK", :metric => 1, :state => 'ok' } else {:service => plugin.service, :description => "Self update status in #{plugin.file}, state: #{state['status']}, code: #{state['code']}", :metric => 0, :state => 'critical' } end