lib/riemann/babbler/plugin.rb in riemann-babbler-0.9.7 vs lib/riemann/babbler/plugin.rb in riemann-babbler-0.9.8
- old
+ new
@@ -1,13 +1,16 @@
#encoding: utf-8
-require File.expand_path('../plugin_helpers', __FILE__)
+require File.expand_path('../support/plugin_helpers', __FILE__)
require 'riemann/client'
require 'open3'
require 'timeout'
require 'rest_client'
-require File.expand_path('../monkey_patches', __FILE__)
+require 'socket'
+require 'net/ping'
+require 'sequel'
+require File.expand_path('../support/monkey_patches', __FILE__)
# Базовое описание плагина
module Riemann
class Babbler
@@ -31,10 +34,9 @@
@riemann = riemann
@storage = Hash.new
@hostname = get_hostname
init
plugin.set_default(:interval, configatron.riemann.interval)
- run
end
# Доступ к конфигу определенного плагина
def plugin
plugin_name = self.class.name.split('::').last.gsub( /(\p{Lower})(\p{Upper})/, "\\1_\\2" ).downcase