Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword
Like this
2Activity
0 of .
Results for:
No results containing your search query
P. 1
proc-NAGIOSconfig

proc-NAGIOSconfig

Ratings:

4.0

(1)
|Views: 118|Likes:
Published by naveendy
tool
tool

More info:

Published by: naveendy on Jul 22, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

05/11/2014

pdf

text

original

 
Nagios, configuration
RevisionDateByChanges
0130
th
of August 05T. SluyterInitial creation01Reviewed0202Reviewed
Summary
This document provides detailed information on all the intricacies of configuring Nagios.It tells you about setting up the basic server, as well as configuring the server for themonitoring of various clients.For an explanation of the basic functioning of Nagios, please refer to “NAGIOS basicguide”, which is available on Sharepoint.
Table of Contents
Installing the server software...............................................................................................2Restoring the server software..............................................................................................2The Nagios user...................................................................................................................3Configuration files................................................................................................................3Building hosts and hosts groups.........................................................................................5Setting up contacts and notification.....................................................................................7Setting up the clients............................................................................................................8Configuring for each UNIX client ........................................................................................8Writing your own NRPE scripts.........................................................................................11Configuring for each Windows client ................................................................................14
 
Installing the server software
You should never have to reinstall the Nagios server, unless the following scenario evertakes place:1.The current server dies in such a horrible way that neither its boot disk, nor the mirrorare usable.2.The backups of the current server have become completely unreadable.3.The off-site backup copies have all been destroyed by a hurricane, a tidal wave or theApocalypse (in which case you will probably not need the Nagios server anyway).However, should you ever be interested in how the original server was built, I would liketo nudge you towards the documentation provided along with Nagios. It providesexcellent descriptions on how to compile all of the software and how to get things up andrunning.Unfortunately there were a few caveats which I experienced while following theirprocedures, so I will include them here:
Compiling the Nagios base software requires four additional libraries to be installedon your server:GD (available from boutell.com/gd as source code)libpng (available from Sunfreeware.com as a package)libjpg (available from Sunfreeware.com as a package).cgiwrap-3.9 (available from Sunfreeware.com as a package).
Compiling GD may run into problems with
ar
. This is the library archiver. Edit the filecalled
libtool
and change the line which sets
$AR
to
/usr/ccs/bin/ar
.
When compiling Nagios the
configure
script may complain that it still cannot findthe libraries for GD, jpeg and png. To solve this you need to logout and back in.
Compiling the Nagios plugins also complains about
ar
. In this case the problem iseasily solved by adding
/usr/ccs/bin
to your $PATH variable.
Restoring the server software
Luckily restoring the server software is a lot easier. Just make sure that your new serverhas GD, libpng, libjpg and cgiwrap installed, along with Apache (naturally). The restore
/usr/local/nagios
from tape. This contains all the files required for Nagios.Once that is done, recreate the
nagios
user account (see next chapter) and you shouldbe set!
 
The Nagios user
The Nagios software requires a separate, non-root user account for its operation. Thisuser account will be used to perform all of the checks and to communicate across thenetwork.
!
The
nagios
account is automatically created during a Jumpstart installation of anew server. The account’s password should also be set automatically, but if it doesnot work, the password should be set to the value store in Password Safe, usingthe
 passwd
command.If the user account does not exist, you may add it manually to the system. Add thefollowing line to
/etc/passwd
:
nagios:x:1550:1550:Nagios monitoring:/usr/local/nagios:/bin/bash
Add the following lines to
/etc/group
:
nagios::1550:nagiocmd::1551:nagios,nobody
Add the following line to
/etc/shadow
:
nagios:WeF3zX7JlpZVk:12991:7:56:7:::
Configuration files
First off, let me say that there are three things you should really mind when modifyingthe Nagios configuration files.1.Always work as the user
nagios
, or else you'll be screwing up file permissions.2.Always make backup copies of the file you're working in by copying it to a file calledthe same, but with the date appended. For exampled:
services.cfg.20050823
.3.After making changes and before restarting Nagios to activate your changes, makesure that you validate the new configuration files. Run
$NAGIOS-BIN/nagios -v /usr/local/nagios/etc/nagios.cfg
.All configuration files are located in
/usr/local/nagios/etc
. A number of these filesyou will only edit during the initial setup of the Nagios server, after which you'll mostprobably not touch them again. The remaining files are used for monitoring.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->