Diff for "Nagios3"


Differences between revisions 28 and 29
Revision 28 as of 2010-12-27 18:57:40
Size: 3828
Editor: 78-105-201-166
Comment:
Revision 29 as of 2010-12-27 18:59:13
Size: 3828
Editor: 78-105-201-166
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
||<tablestyle="float:right; font-size: 0.9em; width:40%; background:#F1F1ED; margin: 0 0 1em 1em;" style="padding:0.5em;"><<TableOfContents(2)>>|| ||<tablestyle="float:right; font-size: 0.9em; width:20%; background:#F1F1ED; margin: 0 0 1em 1em;" style="padding:0.5em;"><<TableOfContents(2)>>||

This page describes how to install and configure Nagios 3 on Ubuntu 9.04.

This guide was done using Ubuntu 9.04. Appears to work ok with 9.10.

Introduction

Nagios is an open source host, service and network monitoring program. The official homepage is http://nagios.org/

Preparations

You will first manually install Nagios 3 from the Ubuntu main repositories.

sudo apt-get install -y nagios3

This will install and configure Nagios 3 along with all the required dependencies including Apache2, Postfix and others.

Postfix is used to send e-mail alerts. During the installation you will be prompted to select how you want to configure Postfix. For most setups you will select 'Internet Site' which is the default select. If you require other setup, please refer to the Postfix support page.

Once Nagios has been installed you will need to create user accounts so you can login to the Nagios monitoring site.

The site will be installed locally at http://localhost/nagios3

Create a 'nagiosadmin' user account so that you can login and administer the site.

sudo htpasswd -c /etc/nagios3/htpasswd.users nagiosadmin

Enter a strong password when prompted.

You now have a very basic working installation of Nagios on your system (login at http://localhost/nagios3 with those credentials). It has been configured to monitor your local machine.

Post Install Tasks

Nagios 3's configuration files are located in /etc/nagios3

If you need to add new hosts or make changes to existing ones you can find them at: /etc/nagios3/conf.d

All the plugin's are located at: /etc/nagios-plugins/config

You might see a couple of errors which can be easily fixed.

The first might be an SSH critical error if you don't have an OpenSSH server running on your local machine. You can either install OpenSSH server or remove this error warning by editing the file in /etc/nagios3/conf.d/hostgroups_nagios2.cfg and removing the localhost from the member.

The second might be a hard disk check critical error related to the way Gnome is designed and how permissions are assigned to the .gvfs file in each users home directory, ex:

DISK CRITICAL - /home/rdp/.gvfs is not accessible: Permission denied

You can either give the nagios user permission to that file or just ignore the file during check. To ignore the file, edit the disk.cfg file located in /etc/nagios-plugins/config and add the arguments [-A -i '.gvfs'] at the end of the command line arguments for the command check_disk and check_all_disks.

Update

I want to add that if you are installing on Ubuntu 10.04 LTS and using check_nt to check Windows server there a few changes you need to make to nt.cfg.

sudo nano /etc/nagios-plugins/config/nt.cfg

Remove the " ' " in the define commands so it looks like this:

define command {
        command_name    check_nt
        command_line    /usr/lib/nagios/plugins/check_nt -H $HOSTADDRESS$ -v $ARG1$
}

# 'check_nscp' command definition
define command {
        command_name    check_nscp
        command_line    /usr/lib/nagios/plugins/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$
}

You may need to add a $ARG2$, $ARG3$ ,etc.. depending on what you are checking. I also would recommend that you use check_nscp or add the port '-p 12489' to the check_nt command or you may receive 'Unable to connect' errors.

This info. was obtained from #nagios on freenod and hours of trying to get it to work.

Also be sure to check out: http://nagios.sourceforge.net/docs/3_0/monitoring-windows.html


CategoryInternet CategoryNetworking

Nagios3 (last edited 2012-05-03 03:14:56 by ip70-171-253-105)