Sha256: 4dc3337e6c4c86726212098791c7c9d6c559e81c7f424d8f328dede534a84926

Contents?: true

Size: 805 Bytes

Versions: 22

Compression:

Stored size: 805 Bytes

Contents

#!/usr/bin/env ruby
require 'rubygems'
require 'optparse'
$LOAD_PATH << "#{File.dirname(__FILE__)}/../lib"
require 'deputy'

OptionParser.new do |opts|
  opts.banner = <<BANNER
Report to the sheriff

Usage:
    deputy System.metric value
    deputy [OPTION]

Options:
BANNER

  opts.on("-h", "--help","Show this.") { puts opts; exit }
  opts.on('-v', '--version','Show Version'){ puts Deputy::VERSION; exit}
  opts.on('--install-cron','Install crontask'){ Deputy.install_cron; exit}
  opts.on('--run-plugins','Run all plugins for this minute (belongs into crontask)') do
    puts Time.now.strftime("%Y-%m-%d %H:%M:%S")
    Deputy.run_plugins
    exit
  end
end.parse!

metric, value = ARGV[0..1]
if metric.to_s.empty?
  puts "Usage instructions: deputy --help"
  exit
end

Deputy.send_report metric, value

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
deputy-0.1.39 bin/deputy
deputy-0.1.38 bin/deputy
deputy-0.1.37 bin/deputy
deputy-0.1.36 bin/deputy
deputy-0.1.35 bin/deputy
deputy-0.1.34 bin/deputy
deputy-0.1.33 bin/deputy
deputy-0.1.31 bin/deputy
deputy-0.1.30 bin/deputy
deputy-0.1.29 bin/deputy
deputy-0.1.28 bin/deputy
deputy-0.1.27 bin/deputy
deputy-0.1.26 bin/deputy
deputy-0.1.25 bin/deputy
deputy-0.1.24 bin/deputy
deputy-0.1.23 bin/deputy
deputy-0.1.22 bin/deputy
deputy-0.1.21 bin/deputy
deputy-0.1.20 bin/deputy
deputy-0.1.19 bin/deputy