Deploying a Nagios monitoring server

Nagios is one of the most widely used monitoring servers available. Chef provides you with a cookbook to install a Nagios server, as well as Nagios clients. It provides ways to configure service checks, service groups, and so on, using data bags instead of manually editing Nagios configuration files.

Getting ready

Make sure that you have a cookbook named my_cookbook and that the run_list of your node includes my_cookbook, as described in the Creating and using cookbooks recipe in Chapter 1, Chef Infrastructure:

  1. Create your Berksfile in your Chef repository including the nagios cookbook:
    mma@laptop:~/chef-repo $ subl Berksfile
    cookbook 'resource-control', '~>0.1.2'
    cookbook 'apache2', '~>3.2.2', github: 'sous-chefs/apache2' ...

Get Chef Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.