Nagios Installation On Ubuntu 10.04 (Lucid Lynx)

This tutorial shows how to set up Ubuntu Lucid Lynx (10.4) server with the Nagios Monitoring System. Nagios is a powerful, highly configurable monitoring and alarming system, which can monitor a wide variety of systems (network, server, daemons, applications). Monitoring could be done for instance for availability or utilization. The monitoring could be restricted to services which are connectable from the outside (e.g. a webserver on port 80/tcp), or with the help of NRPE (Nagios Remote Plugin Executor) plugins for testing could also be executed remote.  There is a lot of info about nagios in the net, so feel free to use your preferred search engine to find whatever you need about it.  One new feature for Nagios 3.2.3 is the ability to have multiple escalations. One person(s) can be notified at first notification, if no one has responded alternate people can be alerted to the issue. We will be installing Nagios, Nagios Plugins, and Postfix with this tutorial. Postfix will be configured to send email via your alternate email server. This tutorial will only give you the basic configuration with Postfix, any additional settings can be found in multiple places on the Internet. A great place to start looking is http://wiki.nagios.org/index.php/Forums the Nagios Forums.

I have created a script that will do all of the leg work for you. It will install all of the requirements for Nagios, Nagios Plugins, and Postfix. I will lay out the commands to enter manually if you would like to take care of business that way, or you can use the included script. The script in its entirety will be at the end of this tutorial.

 

Basic Install Of Ubuntu Server

First thing you will want to do is start with a fresh install of Ubuntu with only SSH server installed. Please follow the below instructions on setting up your initial server. 

Select English, or your language of preference.

Now select Install Ubuntu Server:

Again select your language of preference:

Now choose your region here:

Now select No to Detect Keyboard Layout:

Now select where your keyboard is from:

Now select your keyboard layout:

Now we will continue on with the installation:

Now select your time zone (Ubuntu will automatically detect its best guess for you):

Now we are preparing for the partitioning of the hard drive:

I always use the entire disk when I set up a new server:

Now hit Enter to continue using your selected hard drive:

Select Yes to write the changes to the hard drive:

Now the system will partition your hard drive:

Share this page:

9 Comment(s)

Add comment

Comments

From: Avin at: 2011-02-21 06:16:54

As usual ..Great Post

From: Anonymous at: 2011-02-19 02:34:38

I think there's an error on page 3 of the guide.

echo "nagios mailusername@yourmailserver.com" /etc/postfix/canonical

should be

echo "nagios mailusername@yourmailserver.com" >> /etc/postfix/canonical

Right?

I'd rather this comment not be published - just correct the directions.

From: withanHdammit at: 2011-02-21 15:58:26

Your text would not let me make/make install the plugins.  I checked your script to see what was in there and it appears the text of your walk-through is missing this line:

./configure --with-nagios-user=nagios --with-nagios-group=nagios

From: Vidyadhar at: 2011-02-24 14:25:48

You can following below steps to install nagios on Ubuntu,

http://www.techienote.com/2011/02/netflow-on-ubuntu.html

You can also configure nagios through nconf, see this

http://www.techienote.com/2011/01/nconf-on-ubuntu.html

From: Anonymous at: 2011-02-24 07:37:58

One too many "d's", should be enable instead of enabled:

postconf -e 'smtp_sasl_auth_enabled = yes'

From: Anonymous at: 2011-02-24 05:48:08

Thanks for the excellent howto; it's the first Nagios install text I've gone through that just works! One question: towards the end, just after restarting Postfix you write "Now that this all has been completed you can restart your system." Could you explain why that is necessary?

From: thiyagi at: 2011-05-20 15:05:02

thanks for the tutorial..
but i think u left one step , before make the nagios-plugins...

./configure --with-nagios-user=nagios --with-nagios-group=nagios

and then make, make install.. everything else worked fine

From: Anonymous at: 2012-01-25 21:59:18

Why do you use Ubuntu, and then compile everything from source?

 The only useful part of Ubuntu is the package management.

 Scrap this entire howto, and replace it with:

"aptitude install nagios3 nagios-plugins" (or apt-get)

From: Anonymous at: 2012-03-23 20:56:56

error 404- wget http://prdownloads.sourceforge.net/nagios/nagios-3.2.3.tar.gz
 should be updated to wget http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-3.2.3.tar.gz