lib/riemann/babbler/plugin.rb in riemann-babbler-0.1.7 vs lib/riemann/babbler/plugin.rb in riemann-babbler-0.1.8
- old
+ new
@@ -42,18 +42,24 @@
hostname += options.riemann.suffix unless options.riemann.suffix.nil?
hostname = options.riemann.prefix + hostname unless options.riemann.prefix.nil?
hostname
end
+ # не запускаем плагин есть
+ def not_run_plugin
+ false
+ end
+
def riemann
@riemann ||= Riemann::Client.new(
:host => options.riemann.host,
:port => options.riemann.port
)
end
alias :r :riemann
def run
+ return 0 if not_run_plugin
t0 = Time.now
loop do
begin
tick
rescue => e