lib/cloudstack-nagios/commands/nagios_config.rb in cloudstack-nagios-0.14.2 vs lib/cloudstack-nagios/commands/nagios_config.rb in cloudstack-nagios-0.15.0

- old
+ new

@@ -29,10 +29,11 @@ invoke "nagios_config:list", [] exit end routers = configs.include?("router_hosts") ? cs_routers : nil + system_vms = configs.include?("system_vm_hosts") ? cs_system_vms : nil pools = configs.include?("storage_pools") ? storage_pools : nil zones = client.list_zones config_name = configs.size == 1 ? "#{configs[0]} configuration" : "all configurations" @@ -49,10 +50,11 @@ tmpl_file = File.join(TEMPLATE_DIR, "cloudstack_#{config}.cfg.erb") end template = load_template(tmpl_file) output += template.result( routers: routers, + system_vms: system_vms, bin_path: bin_path, if_speed: options[:if_speed], config_file: options[:config], zones: zones, capacity_types: Capacity::CAPACITY_TYPES, @@ -76,11 +78,11 @@ end no_commands do def get_configs(configs = []) - all_configs = %w(hostgroups zone_hosts router_hosts router_services capacities async_jobs storage_pools) + all_configs = %w(hostgroups zone_hosts router_hosts router_services system_vm_hosts system_vm_services capacities async_jobs storage_pools) if configs.size == 0 return all_configs else if configs.size == 1 && configs[0].downcase == "all" return all_configs @@ -100,6 +102,6 @@ return options[:bin_path].end_with?('/') ? options[:bin_path] : options[:bin_path] + "/" end end end - end \ No newline at end of file + end