define command { command_name cs-nagios_check-storage_pool command_line <%= bin_path -%>cs-nagios check storage_pool --pool_name $ARG3$ --over_provisioning $ARG4$ -w $ARG1$ -c $ARG2$ --config <%= config_file %> register 1 } <% storage_pools.each do |storage_pool| -%> define service { hostgroup_name Cloudstack service_description Cloudstack Storage Pool <%= storage_pool['zonename'] %> <%= storage_pool['name'] %> display_name Cloudstack Storage Pool <%= storage_pool['zonename'] %> <%= storage_pool['name'] %> use Generic-Service,service-pnp check_command cs-nagios_check-storage_pool!80!90!<%= storage_pool['name'] %>!<%= over_provisioning %> register 1 } <% end -%>