<% capacity_types.each do |cap_type, cap_values| -%> object CheckCommand "cs-nagios_check-capacity_<%= cap_values[:method_name] %>" { import "plugin-check-command" command = [ "<%= bin_path -%>cs-nagios", "check", "capacity", "<%= cap_values[:method_name] %>" ] arguments = { "-w" = "80" "-c" = "90" "--config" = "<%= config_file %>" "--zone" = "$ARG3$" } } <% end -%> <% zones.each do |zone| -%> <% capacity_types.each do |cap_type, cap_values| -%> apply Service "Cloudstack <%= zone['name'] %> <%= cap_values[:name] %>" { import "generic-service-pnp" check_command = "cs-nagios_check-capacity_<%= cap_values[:method_name] -%>" assign where host.name in [ "Cloudstack_<%= zone['name'] %>" ] } <% end -%> <% end -%>