Icinga 2 Cookbooks: Breaking up the All-In-One Cookbook

For vendors, configuration management has become as important as the software itself. As a vendor you should take responsibility and provide proper cookbooks for your software that fulfill the requirements for as many users as possible. The Icinga 2 cookbook used to manage all of the components you need to get your monitoring servers and agents up and running. Additionally, it allows users to automate the whole monitoring lifecycle, from freshly occurring hosts and services up to the deletion of those. Recently, we decided that it’s better to split the single cookbook, instead of maintaining an “all-in-one” solution.

What is Icinga 2

Icinga is an open source monitoring software that monitors your hosts, applications and services. The results include the current state and metrics, both can be saved for long term. Instead of configuring everything statically, Icinga 2 allows you to create apply rules which generate your monitoring objects dynamically. With the RESTful API changes can be made automatically and from remote. Icinga has a built in clustering mechanism to create high available and distributed setups.

Icinga 2 works very well in combination with Chef to create an automated monitoring environment. Since Chef knows everything about your infrastructure, you can use this knowledge to create your monitoring configuration out of it.

Breaking up the Cookbooks

The Icinga Stack consists of multiple components. Depending on your setup and feature requirements, you will have to set up more or less of the available tools. The Icinga 2 cookbook could handle all of those requirements and with each new aspect of the stack the cookbook grew as well. We reached a point where we wanted to make it easier for our users to pick the exact parts they needed for their very own monitoring setup. The web interface may run on a different host than the master. An agent has less requirements than a master, it just needs to be installed and connected.

To make this easier to handle and to prevent a big and monolithic cookbook, we decided to break up the Icinga 2 cookbook. Eventually, smaller cookbooks allow us easier maintenance and independent releases. All cookbooks are part of the Chef partner program and available for many platforms and multiple Chef versions.

Icinga 2 Repository

All Icinga related packages are available on packages.icinga.com. This cookbook adds and enables the repository on your node. Repository management has been separated as it is required by multiple cookbooks and we wanted to prevent maintenance of duplicated code.

Download: https://supermarket.chef.io/cookbooks/icinga2repo

Icinga 2

The Icinga 2 Cookbook manages Icinga 2 servers. This includes the management of all features, configurations and Icinga objects. With this cookbook you can set up your master and add satellites to it to distribute the load.

Download: https://supermarket.chef.io/cookbooks/icinga2

Icinga 2 Client

The Icinga 2 client cookbook manages Icinga 2 on your agents and connects them to a master or satellite.

Download: https://supermarket.chef.io/cookbooks/icinga2client

Icinga Web 2

This cookbook manages everything related to the web interface for Icinga 2.

Download:  https://supermarket.chef.io/cookbooks/icingaweb2

Blerim Sheqa

Blerim Sheqa works at NETWAYS, a company dedicated to open source software. He used to work as a Systems Engineer and help customers with their monitoring, logging and configuration management. As a Product Manager for Icinga he helps to develop the product strategy, conception and product management in general.