public
Description: Daemon for external monitoring of infrastructure with Dash
Homepage:
Clone URL: git://github.com/fiveruns/dash-sensor.git
bruce (author)
Thu Feb 26 18:09:50 -0800 2009
commit  2c4cce04e1b6c379eb0f1346c6287512f5633fbc
tree    e55dc62125e54bf924ae89d398b0b8aad1e97049
parent  91fd50f3c02bf0ae6916b40b7eff81e7d0d7f445
dash-sensor / bin / fiveruns-dash-sensor
100755 26 lines (22 sloc) 0.617 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env ruby
 
begin
  require 'runner'
rescue LoadError
  $LOAD_PATH.unshift File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
  require 'runner'
end
 
app_options = {
  :config_file => File.expand_path('~/.fiveruns-dash-sensor/config.rb')
}
 
app = Dash::Runner.new
app.parse do |opts|
  opts.on("-c CONFIG", "--config FILE", "Select config file [default: #{app_options[:config_file]}]") do |v|
    app_options[:config_file] = v
  end
end
app.start do |options|
  require "sensor"
 
  all_opts = app_options.merge(options)
  engine = Dash::Sensor::Engine.new(all_opts)
  engine.start(all_opts)
end