Copied across some more stuff from the chef/nagios branch.