opscode-cookbooks/nagios — pull request #71 by stevendanna (2012-12-09 18:38:07+00:00)
Title: [COOK-2034] Remove nested search calls to improve chef-client run time

Since the recipe already searches for all nodes using either:

search(:node, "hostname:[* TO *]")

or

seach(:node, "hostname:[* TO *] AND "\
"chef_environment:#{node.chef_environment}")

Rather than repeatedly using the search API, we can filter the
existing results. This substantially shortens the length of an
average chef-client run.

Note that when first deploying this change, you may see a number of
configuration file changes as the ordering of the nodes may change.
Subsequent runs should be stable since we sort the nodes array.