#!/usr/bin/env ruby begin require 'zabbix-cloudwatch' require 'getopt/long' rescue require 'rubygems' require 'zabbix-cloudwatch' require 'getopt/long' end @@aws_access_key='' @@aws_secret_key='' @@aws_region='' class RubyVersionException < StandardError; end raise RubyVersionException, "Ruby version must be 1.8.7" unless RUBY_VERSION == "1.8.7" opts = Getopt::Long.getopts( ["--help"], ["--namespace", Getopt::REQUIRED], ["--metricname", Getopt::REQUIRED], ["--dimension-name", Getopt::REQUIRED], ["--dimension-value","-v", Getopt::REQUIRED], ["--monitoring-type", "-t", Getopt::REQUIRED], ["--statistic",Getopt::REQUIRED], ["--aws-access-key", Getopt::REQUIRED], ["--aws-secret-key", Getopt::REQUIRED], ["--aws-region", Getopt::REQUIRED], ["--version"] ) def usage puts <