Nagiosdevelopment

Rewritten with incorporation of Hans' comments. See previous pull request for details.