lib/zabbix-ruby-client/cli.rb in zabbix-ruby-client-0.0.8 vs lib/zabbix-ruby-client/cli.rb in zabbix-ruby-client-0.0.9
- old
+ new
@@ -14,10 +14,15 @@
class_option :configfile,
aliases: "-c",
banner: "PATH",
default: File.expand_path("config.yml", Dir.pwd),
desc: "Path to the configuration file to use"
+ class_option :taskfile,
+ aliases: "-t",
+ banner: "PATH",
+ default: File.expand_path("minutely.yml", Dir.pwd),
+ desc: "Path to the list of plugins to execute"
desc "init", "Initialize a new zabbix ruby client"
def init(name = "zabbix-ruby-client")
directory "client", name
end
@@ -28,20 +33,20 @@
Bundler.require
rescue Bundler::GemfileNotFound
say "No Gemfile found", :red
abort
end
- zrc = ZabbixRubyClient.new(options[:configfile])
+ zrc = ZabbixRubyClient.new(options[:configfile],options[:taskfile])
zrc.collect
zrc.show
end
desc "upload", "Collects and sends data to the zabbix server"
def upload
- zrc = ZabbixRubyClient.new(options[:configfile])
+ zrc = ZabbixRubyClient.new(options[:configfile],options[:taskfile])
zrc.collect
zrc.upload
end
end
-end
\ No newline at end of file
+end