<% @applications.each do |application, values| %> <% database = values['db']['name'] %> <% unless database.empty? %> define service{ use generic-service servicegroups databases host_name <%= node['gazelle_nagios']['hostname'] %> service_description <%= database %> - archive_ready check_command check_postgresql_db!archive_ready!<%= database %> } define service{ use generic-service servicegroups databases host_name <%= node['gazelle_nagios']['hostname'] %> service_description <%= database %> - connection check_command check_postgresql_db!connection!<%= database %> } define service{ use generic-service servicegroups databases host_name <%= node['gazelle_nagios']['hostname'] %> service_description <%= database %> - index_size check_command check_postgresql_db_limits!index_size!<%= database %>!300000000!500000000 } define service{ use generic-service servicegroups databases host_name <%= node['gazelle_nagios']['hostname'] %> service_description <%= database %> - last_analyze check_command check_postgresql_db_limits!last_analyze!<%= database %>!1000000!100000000 } define service{ use generic-service servicegroups databases host_name <%= node['gazelle_nagios']['hostname'] %> service_description <%= database %> - last_vacuum check_command check_postgresql_db_limits!last_vacuum!<%= database %>!1000000!100000000 } define service{ use generic-service servicegroups databases host_name <%= node['gazelle_nagios']['hostname'] %> service_description <%= database %> - relation_size check_command check_postgresql_db_limits!relation_size!<%= database %>!1000000000!1500000000 } define service{ use generic-service servicegroups databases host_name <%= node['gazelle_nagios']['hostname'] %> service_description <%= database %> - table_size check_command check_postgresql_db_limits!table_size!<%= database %>!1000000000!1500000000 } <% end %> <% end %>