Installing Nagios on Ubuntu 9.04
Nagios is a good open source tool for monitoring network components and services. Can be configured to send alerts by e-mail.
Since the new version (3) is geseste in repositories, installation is much easier now, using apt-get:
sudo apt-get install nagios3
Checking installation:
nagios3 sudo-v nagios.cfg
Should look like this test:
Nagios 3.0.6
Copyright (c) 1999-2008 Ethan Galstad (http://www.nagios.org)
Last Modified: 01/12/2008
License: GPL
Reading configuration on ...
Running pre-flight check on configuration on ...
Checking services ...
Checked 7 services.
Checking hosts ...
Checked two hosts.
Checking host groups ...
Checked 5 host groups.
Checking service groups ...
Checked 0 service groups.
Checking contacts ...
Checked two contacts.
Checking contact groups ...
Checked a 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 ...
Obsessive compulsive processor commands ... Checking
Checking misc settings ...
Total Warnings: 0
Total Errors: 0
Things look okay - No Serious Problems Were Detected During the pre-flight check
Everything would be ok so far terbite. Errors that might occur are in most cases because of permissions.
Still need to add user for Nagios (before it must go in / etc/nagios3):
cd / etc/nagios3
sudo htpasswd-c htpasswd.users Nagios
You must enter a password 2 times for new user:
New password:
Re-type new password:
Adding password for user Nagios
At this point, Nagios can be accessed by Web interfara.
http://localhost/nagios3/
as appropriate, http://IP/nagios3/
Now you can configure Nagios. Configuration file found in / etc/nagios3/nagios.cfg. The rest found conf.d files which allow various configurations. The file is contacts_nagios2.cfg set email alerts to be sent to:
gedit contacts_nagios2.cfg
define contact {
contact_name alex
alias Nagios Admin
service_notification_period 24 × 7
host_notification_period 24 × 7
service_notification_options w, u, c, r
host_notification_options d, r
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
email alex@domeniu.ro
}
Emails will be sent to alex@domeniul.ro.
Each contact should be added to contactgroup:
contactgroup define {
contactgroup_name admins
alias Nagios Administrators
members alex
}
Adding new user to the Nagios group:
useradd-m-G Nagios alex
passwd alex
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated Successfully
The web interface can occur following message:
It appears as though you do note have permission to view information for Any of the services you Requested ...
In this case, the edited file cgi.cfg:
sudo gedit cgi.cfg
In this file change the following lines:
authorized_for_system_information = Nagios
authorized_for_configuration_information = Nagios
authorized_for_system_commands = Nagios
authorized_for_all_services = Nagios
authorized_for_all_hosts = Nagios
authorized_for_all_service_commands = Nagios
authorized_for_all_host_commands = Nagios
, Where "Nagios" is the user that Nagios is installed.
If you use this tutorial, any questions or if you give your opinion about him or about Nagios, do not hesitate to leave a comment below. Thanks! ![]()





















July 13th, 2009 at 2:38 p.m.
[...] Use this addon, Nagios obviously need to be installed. No [...]
July 30th, 2009 at 11:06
Very good tutorial. There are plenty of tutorials for installing Nagios on the net, but with your tutorial and I've managed to put up Nagios.
Thanks!
July 30th, 2009 at 12:35
@ Adrian: I'm glad you helped. The autors try to post more tutorials about different.
August 5th, 2009 at 11:23
mee too
August 17th, 2009 at 1:15
I sincerely doubt that will go about ceva.dar ... to my amazement .. tutorial is a very well explained and ptr unaware ...
I'm one of them and I want to thank you.
if you can come up with a little help and meaning mysql management settings and possibly on how to "work" with him broswer + some php admin would already be all you can say about webhosting.
Many thanks again
August 18th, 2009 at 11:03
@ BFC

I'm glad the tutorial helped you - know that all tutorials / methods presented here are tested, so as to not have much work.
Of course I want to make many more tutorials, possibly to complete something for the existing, but have very little time for me to take care of it.
I do not understand what you mean when you say "help in the sense mysql and php admin" - an installation guide for this?
Thanks for comment and you wait here.