Automated monitoring configuration has many facilities. Some use configuration management software such as Puppet or Chef to deploy their host and service definitions. Others use the Director to import hosts from an existing CMDB and users from Active Directory. Independent from the technique that you use, I am sure we all agree that automated monitoring configuration is a huge benefit.
Today I am pleased to tell you about a new mechanism that came up recently to automate host creation in Icinga. The Foreman is a complete lifecycle management tool for physical and virtual servers. Servers can be installed classically via PXE or by using a cloud provider like Azure or DigitalOcean. You can also easily spawn Docker containers. The Foreman integrates configuration management tools such as Puppet, Chef or Ansible to set up and configure software after the installation. The list of available plugins is endless.
Smart Proxy – Monitoring
A Smart Proxy is the connection between Foreman and another server that provides certain functionality. It allows Foreman to control services such as DNS, TFTP or DHCP that are not located on the same machine. The Monitoring Smart Proxy connects Foreman with your monitoring tool and allows it to perform actions. Currently, the available providers for the Monitoring Smart Proxy are Icinga 2 and Icinga Director, others may follow in the future.
Managing Icinga with the Foreman
The Icinga provider uses the Icinga 2 API to communicate with your monitoring server. It receives the current state of your hosts from an event stream and displays it in the Foreman web interface. When you create a new host in Foreman, it is created in Icinga 2 as well. The provider checks if the host already exists and either creates or updates it. The hosts configured in your Icinga remain always up to date automatically. Especially combined with apply rules this is a very powerful workflow, because services for new hosts are created dynamically. When the lifecycle of a machine ends and you delete it, the Monitoring Smart Proxy can either delete the host in Icinga, set a downtime or don’t act on it at all.
Documentation and Installation
Like all other official Foreman plugins, the Monitoring Smart Proxy is available on GitHub and in the official Foreman repository. The documentation is located on the project page and describes all functionalities.
Attend the upcoming webinar Foreman Deep Dives: Monitoring with Foreman to learn more about how you can use the Monitoring Smart Proxy to create an automated monitoring solution with Foreman and Icinga 2. The developers of this plugin, Timo Goebel (FILIADATA/dm) and Dirk Götz (NETWAYS) will demonstrate the basic functionality of the plugin and explain how to set it up.
The webinar is a free event that takes place on 4 Mai, 2017 – 16:00-17:00 (+02:00). Follow the livestream on YouTube.