It doesn’t matter if you want to monitor an individual computer system, a database, or a server: you don’t install the software on the respective devices, but rather on a separate Nagios server. From here, you configure (in an object-orientated way) which systems and processed are to be observed. Everything revolves around these four components or object types:
- Hosts: as a host, you define all devices, servers, databases, etc. belonging to the network that you want to monitor. The most important indicator of a host is the respective IP address.
- Services: with services, you define which host features Nagios should check. These features may be services that run on the host (i.e. HTTP, FTP, etc.), internal attributes such as available disk space, or physical characteristics such as the temperature value of the hardware.
- Commands: with commands, you control the sequence of monitoring. You can configure how the host and service monitoring is designed and when Nagios should notify you if something happens.
- Contacts: due to the defined contacts, Nagios knows who to notify should an event occur. The software sends an e-mail, a text message, or a voice message depending on what you’ve specified.
Although Nagios itself isn’t installed on different hosts, plugins (which check internal data) run directly on the hosts. Remote access can be used to solve this, but it’s rarely used as it’s with more effort and disproportionate system use (with a secure connection). The easier alternative is to install specific programs on the hosts. These perform only from the pre-configured system queries and send the results via network ports to the Nagios server. The Nagios Remote Plugin Executor (NRPE) is used by default here and with its support, Nagios can also monitor Windows systems.
An additional possibility for using Nagios for checking respective data is by carrying out a passive check. In this case, no information is requested from the monitoring software, but rather from another program such as Nagios Service Check Acceptor (NSCA). The monitoring server is only notified of the result after it’s been processed. Regardless of the type of monitoring, the Nagios server always transmits one of the following status values:
- 0 (OK): no problems were found during the review.
- 1 (WARNING): the review resulted in a warning message.
- 2 (CRITICAL): a critical problem arose during the review.
- 3 (UNKNOWN): the status of the host or service could not be determined.
In addition, the monitoring program also receives a time stamp, an internal command as well as an optional text that can be issued during the review.