Nagios For Monitoring Servers

monitor

Nagios (www.nagios.org) is a Linux-based, open-source monitoring package that provides state-of-the-art functionality, giving commercial products a run for their money. Nagios has the capability to monitor any machine or device that implements TCP/IP, and custom plug-ins can be developed for devices such as temperature sensors and HVAC monitors.

First, you need to understand exactly what it is that needs monitoring. For example, a machine running a Web and mail server would probably require, at a minimum, three different types of monitoring checks. A general ping would let the monitor know that the machine was indeed alive, and specific checks on HTTP and SMTP services would be needed to ensure all services were functioning. Nagios provides this multilevel monitoring capability out of the box.

We used Nagios in our environment to monitor a Web server, a mail server and one running MySQL and a custom server application. To fully monitor the environment, the monitoring solution had to be able to ping each machine, connect via HTTP and HTTPS to each Web server, connect via SMTP to the mail server, and finally connect to the database server and the custom server application. I added e-mail and pager notifications if any machine encountered problems.

My solution was up and running in about 30 minutes. I tested the configuration by stopping the Web server on one of the servers; within two minutes, I had an e-mail that the service was down. After restarting HTTP, I received another e-mail that the service had recovered. Notifications are very flexible and can be sent to any device that can be addressed via e-mail. Notification escalation is also possible. For example, if your primary point of notification does not respond to the Nagios system alert within a specific point of time, the notification can be sent to another individual.

id
unit-1659132512259
type
Sponsored post

To set up custom alerts, Nagios comes with a plug-in that checks any TCP connection on any address and any port. Nagios comes with plug-ins that connect to HTTP, FTP, SSH, MySQL, Oracle, SMTP, POP, DNS and some 20 more.

To easily describe the monitored environment to the Nagios end user, host groups are created (via a configuration file) that allow different servers to be grouped together into a logical unit.

Nagios is one of those open-source gems that provides great documentation. Commercial support is available for Nagios, making it a complete offering that solution providers can depend on.

Kevin Carlson ([email protected]) is CTO of Verteris, an Atlanta-based ISV.