Quickly install Nagios on Ubuntu
Nagios is not just a tool, it's one of the best open source network monitors available. Nagios has a simple plug-in design that allows administrators to easily create their own checks and monitors. The problem that so many see with Nagios is that it is supposedly so difficult to install. That is not the case. In fact, with the help of the Synaptic package manager, Nagios is simple to install and get up and running.
In this article I will show you how to quickly get Nagios up and running. In no time you will have Nagios up and running and monitoring your network.
Features of Nagios
Before we get to the installation, let's take a look at the features of Nagios. Nagios can:
- Monitor network services (SMTP, POP3, HTTP, NNTP, PING, etc.)
- Monitor host resources (processor load, disk usage, etc.)
- Allow for simple plugin design
- Do parallelized service checks
- Define a network host hierarchy using
- Contact administrators when service or host problems occur
- Define event handlers to be run during service or host events for proactive problem resolution
- Automatd log file rotation
- Support the implementation of redundant monitoring hosts
- Offer an optional web interface for viewing current network status, notification and problem history, log file, etc
Sold yet? You should be, especially considering this tool is free and open source! Now, let's get on with the installation.
Follow these simple steps to installing Nagios:
- Fire up Synaptic.
- Search for "nagios" (no quotes)
- Mark nagios3 for installation (this will also pick up all of the dependencies)
- Click Apply to install
During the installation you will be asked for an administrator password. This will be the password for the nagiosadmin user that will have access to the web interface. Once the installation is complete, you need to run a check to make sure everything is okay. The command for this check is:
sudo nagios3 -v /etc/nagios3/nagios.cfg
When this command runs you will see something like:
Copyright (c) 1999-2008 Ethan Galstad (http://www.nagios.org)
Last Modified: 05-19-2008
Reading configuration dataâ€¦
Running pre-flight check on configuration dataâ€¦
Checked 7 services.
Checked 2 hosts.
Checking host groupsâ€¦
Checked 5 host groups.
Checking service groupsâ€¦
Checked 0 service groups.
Checked 1 contacts.
Checking contact groupsâ€¦
Checked 1 contact groups.
Checking service escalationsâ€¦
Checked 0 service escalations.
Checking service dependenciesâ€¦
Checked 0 service dependencies.
Checking host escalationsâ€¦
Checked 0 host escalations.
Checking host dependenciesâ€¦
Checked 0 host dependencies.
Checked 142 commands.
Checking time periodsâ€¦
Checked 4 time periods.
Checking for circular paths between hostsâ€¦
Checking for circular host and service dependenciesâ€¦
Checking global event handlersâ€¦
Checking obsessive compulsive processor commandsâ€¦
Checking misc settingsâ€¦
Total Warnings: 0
Total Errors:Â Â 0
With the results giving 0 errors and 0 warnings, you are ready to log in.
Fire up your web browser and point it to http://IP_TO_SERVER/nagios3 at which point you will be asked for login credentials. Remember that password you gave during installation? That is the password you will use to login (with the user nagiosadmin).
When you log in you will be greeted with the Nagios welcome screen (see Figure 1), at which point you are ready to start monitoring.
Wasn't so bad was it? And you though Nagios was impossible to install. Fortunately it's not. And even more fortunately is how powerful Nagios is. You will be blown away at how useful this tool is.Advertisement