Sha256: c7abe3b8139db08b637271762e6f31ae8aad1d9dbb04880532c7be7707ecba32
Contents?: true
Size: 1.76 KB
Versions: 17
Compression:
Stored size: 1.76 KB
Contents
#!/usr/bin/env ruby # coding: utf-8 require 'trollop' require 'yaml' require_relative '../lib/riemann/babbler' include Riemann::Babbler::Logging include Riemann::Babbler::Options cmd_opts = Trollop::options do version "Riemann babbler #{Riemann::Babbler::VERSION}" banner <<-EOS Riemann-babbler is tool for monitoring with riemann. Usage: riemann-babbler [options] where [options] are: EOS opt :config, 'Config file', :default => '/etc/riemann-babbler/config.yml' opt :host, 'Riemann server', :default => '127.0.0.1', :multi => true opt :port, 'Riemann server default port', :default => 5555 opt :backlog, 'Riemann server backlog for events', :default => 100 opt :timeout, 'Riemann timeout', :default => 5 opt :fqdn, 'Use fqdn for event hostname', :default => true opt :ttl, 'TTL for events', :default => 60 opt :interval, 'Seconds between updates', :default => 60 opt :log_level, 'Level log', :default => 'DEBUG' opt :plugins_directory, 'Directory for plugins', :short => '-d', :default => '/usr/share/riemann-babbler/plugins' opt :tcp, 'Use TCP transport instead of UDP (improves reliability, slight overhead.', :default => true opt :minimize_event_count, 'Minimize count of sent messages', :short => '-m', :default => true opt :responder_bind_http, 'Bind to http responder', :default => '0.0.0.0:55755' opt :responder_bind_udp, 'Bind to udp responder', :default => '0.0.0.0:55955' end # load current settings opts.configure_from_hash({ :riemann => cmd_opts }) @@logger.level = Logger.const_get(opts.riemann.log_level) #todo: to hard merge_config(opts.riemann.config) # start sender = Riemann::Babbler::Sender.new plugins_to_start = Riemann::Babbler::PluginLoader.new.plugin_to_start Riemann::Babbler::PluginManager.new(sender, plugins_to_start).run!
Version data entries
17 entries across 17 versions & 1 rubygems