Installing Nagios via Aptitude on Ubuntu 9.04
So you took the easy way out huh? Fair enough! What you’ll end up with after following this portion of the guide…
- Nagios and the plugin’s will be installed under /etc/nagios3/
- Nagios will be configured enough to monitor a handful of things on your local server
- The handy web interface will work so you can see your local server’s alerts and monitors that come preconfigured.
Required packages
Luckily aptitude handles all the other bits and pieces of the dependencies. So here we go!
- Install Nagios 3.0.6-2ubuntu
- Select “Y” to continue
- You may be prompted to quickly configure postfix
- Select “Internet Site” for now
- Choose the default domain name
- Once Completed we are ready to do the “Pre-Flight Check”
- You should recieve something similar to the text below…
- Move into the Nagios3 directory
- Create the regular “nagios” user and enter a password.
- Create the admin account “nagiosadmin” user and enter a password.
- Go to your browser
- You should be prompted for the username and password you just created. The “nagios” is a regular user without full admin access. The “nagiosadmin” is obviously the admin account that should have access to everything.
$ sudo aptitude install nagios3
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
The following NEW packages will be installed:
apache2{a} apache2-mpm-worker{a} apache2-utils{a} apache2.2-common{a}
bsd-mailx{a} libapr1{a} libaprutil1{a} libmysqlclient15off{a}
libnet-snmp-perl{a} libpq5{a} libradius1{a} mysql-common{a}
nagios-images{a} nagios-plugins{a} nagios-plugins-basic{a}
nagios-plugins-standard{a} nagios3 nagios3-common{a} nagios3-doc{a}
postfix{a} radiusclient1{a} snmp{a}
0 packages upgraded, 22 newly installed, 0 to remove and 0 not upgraded.
Need to get 11.3MB of archives. After unpacking 29.9MB will be used.
Do you want to continue? [Y/n/?]$ sudo nagios3 -v /etc/nagios3/nagios.cfg
Nagios 3.0.6 Copyright (c) 1999-2008 Ethan Galstad (http://www.nagios.org) Last Modified: 12-01-2008 License: GPL Reading configuration data... Running pre-flight check on configuration data... Checking services... Checked 7 services. Checking hosts... Checked 2 hosts. Checking host groups... Checked 5 host groups. Checking service groups... Checked 0 service groups. Checking contacts... 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. Checking commands... Checked 150 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 Things look okay - No serious problems were detected during the pre-flight check
$ cd /etc/nagios3/
$ sudo htpasswd -c htpasswd.users nagios
$ sudo htpasswd htpasswd.users nagiosadminhttp://YOURSERVERIP/nagios3/
Now, for some reason unknown to me there is no logout button. I’ve only read on this briefly and don’t have an exact answer as to why. But just know that if you wish to logout and into a new account you have to close your browser and reopen the page to be prompted for your credentials.
But that is it! You now have a base install of Nagios running ready for your tweaking pleasure. Also, you should know that if you just installed Apache along with this guide it is not secured and I would not suggest opening this up to the Internet. With apache’s basic config, logins and passwords will be sent in clear text until you implement a better method. I’ll be going over Digest authentication in part 2 of Nagios & Ubuntu. I would highly suggest using Digest auth as a bare minimum as it will at least encrypt your session information with a md5 hash.
Part 2 can be found here – http://www.sucka.net/2009/07/nagios-ubuntu-9-04-part-2/






















12 Comments
Only this min located this web site Nagios & Ubuntu 9.04 – Part 1 | 2009-07-24 02:37:34 | by way of Google, a pleasant surprise! Rgds ! Rob Rasner Wikipedia
Very nice read, some valid points were made. (This isn’t some stupid spam reply either, I’m a true follower.)