Chapter 1. Installation and Configuration

Icinga is a scalable open source monitoring system that keeps a close watch on our network and server infrastructure, alerts us of problems and resolutions, and gives uptime reports. Icinga is a fork of the popular Nagios project, which aims to build many necessary features on top of it. Icinga is backward compatible with Nagios, so all of the Nagios configuration and plugins can be reused with Icinga as is.

This chapter covers a brief overview of the Icinga architecture and a basic setup to quickly start monitoring a localhost. We will look into the Icinga installation and gain some insight into the initial configuration, so as to get a basic deployment up and running. At the end of this chapter, we will have a web interface showing the status of various services on a localhost and also through an e-mail alert if one of the services goes down.

An overview

Icinga consists of various components. The Icinga Core handles scheduling of checks and processing their results. Service states are determined by the Core, by either running checks periodically (active checks) or checking the results that are being reported by a remote system (passive checks). Depending on the checks results, the service state is determined, and depending on the notification configuration, notifications are sent if there is a change in the service state.

The Core is not aware of the checks being executed, nor the notification method that is being used. It simply forks the processes to execute the check plugins, and also performs the processing of exit codes. The notification methods are defined by commands that invoke the underlying operating system provided commands (such as sendmail), or scripts that use notification services to actually deliver SMS, IMs, and so on; this means that Icinga is not aware of the particular notification methods either, it is only aware of the command/script to invoke or sending the notification.

The Core also provides all sorts of information (downtimes, check results, alert history, command execution logs, and so on) via logfiles, which can be used to generate reports on a web interface, for instance. Custom scripts and add-ons can use this logfile to read the current state, and data can show this information in various ways, which is useful for analysis, writing add-ons, and so on.

The data revealed by Icinga can be used to build various web interfaces to present monitoring state, and to do various actions from the web interface (schedule downtime, add comments, disable checks, and so on). There are already a few web interfaces available (Icinga Classic, Thruk, and so on) that can be plugged into Icinga and used.

There are many add-ons available online that extends Icinga's functionality to suit specific needs. Some available add-ons include NagVis (visualizing monitoring status), PNP4Nagios (graphing), and NConf and NagiosQL (managing configuration from web interface) . You can find a number of add-ons by visiting http://www.monitoringexchange.org/.

Icinga's configuration is stored in regular text files along with configuration objects in a simple-to-understand format. Each target server, checks to run on them, and so on are configuration objects that are related to each other as desired.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.19.174