lib/riemann/babbler/plugin.rb in riemann-babbler-0.2.3 vs lib/riemann/babbler/plugin.rb in riemann-babbler-0.2.4

- old
+ new

@@ -59,9 +59,22 @@ # не запускаем плагин есть def run_plugin true end + # http rest + def rest_get(url) + begin + RestClient.get url + rescue + report({ + :service => plugin.service, + :state => 'critical', + :description => "Response from #{url}" + }) + end + end + def riemann @riemann ||= Riemann::Client.new( :host => options.riemann.host, :port => options.riemann.port )