Welcome to the world of Nagios, an open source network monitoring tool. Besides being free, powerful and flexible, it can save IT managers a lot of time by automating network monitoring.
In this section of my introduction to Nagios, we'll look at an example of a Nagios configuration. In part one, I discussed the usefulness and architecture of Nagios.
Nagios Configuration
As the previous paragraph implies, configuration plays a large role in successful Nagios operation. The configuration mechanics are conceptually quite straightforward, but require attention to detail. Essentially, a hierarchy of hosts and services are defined, with options defined for what check should be run and what should be done after a failed check.
Here is an example of a host configuration file entry:
[TABLE]
Most of the entries are self-explanatory. The machine has a name, address, a check that should be run (check-host-alive), and a maximum number of checks that should be performed before concluding a problem exists. If there is a problem, the group linux-admins should be notified via the options listed every 30 minutes at all hours of the day or night (24x7). So for this resource, the machine itself must be checked to see if it is up and running.
Here is an example of a service configuration file entry:
[TABLE]
Again, most of the entries are easy to understand. This service runs on the host defined in the previous example. (Services must have an entry for the server they reside on.) A service description a
To continue reading for free, register below or login
To read more you must become a member of SearchEnterpriseLinux.com
');
// -->

nd the command is there to check whether it is up and running, a maximum number of checks, and so on.
An obvious question is, "Now that I'm monitoring all of my hardware and software, how do I find out what's going on?" In addition to the problem notification mechanism listed in each configuration entry ("notification_options"), Nagios provides a number of prewritten CGI scripts that provide monitoring information; in essence a system status dashboard. These scripts provide listings of overall system status, network problems, trends, and so on. Between the dashboard information and the notifications, Nagios enables you to take a more proactive approach to managing your IT infrastructure.
Nagios Recommendations
Like all network management tools, Nagios is fairly complex to set up and requires ongoing tuning to ensure that the level of information provided is right -- neither too much detail nor too little information. Here are some recommendations about how to get the best use of your Nagios implementation:
Nagios is very powerful and can make your life much easier after it's up and running. It's significantly less expensive than the commercial alternatives. And, best of all, because it's open source, it offers the ability to take advantage of the entire community's work with Nagios by sharing plugins and experience.
Bernard Golden is CEO of Navica Inc., a systems integration firm specializing in open source software. He writes a column for SearchEnterpriseLinux.com called Golden's Rules and answers your questions about open source software issues.