lib/cloudstack-nagios/commands/nagios_config.rb in cloudstack-nagios-0.7.1 vs lib/cloudstack-nagios/commands/nagios_config.rb in cloudstack-nagios-0.7.2

- old
+ new

@@ -1,8 +1,17 @@ class NagiosConfig < CloudstackNagios::Base class_option :bin_path, desc: "absolute path to the nagios-cloudstack binary" + desc "generate_all", "generate all nagios configs" + def generate_all + commands = %w(router_hosts router_services api_hosts storage_pool_services capacity_services asyncjobs_services) + commands.each do |command| + invoke "nagios_config:#{command}" + puts + end + end + desc "router_hosts", "generate nagios hosts configuration for virtual routers" option :template, desc: "path of ERB template to use", default: File.join(File.dirname(__FILE__), '..', 'templates', 'cloudstack_router_hosts.cfg.erb'), aliases: '-t' \ No newline at end of file