hi,
i hope this link will help you.
-------------------http://perso.ifsic.univ-rennes1.fr/angelini/GPL/JRES2003-NAGIOS/-------------------------
i am also try ing to set it up.
below is translated version of above link.
_________________________________________________________________________________________
Installation of Nagios 1.1 + Webmin 1.110 + Nagmin 2.0.5 in Redhat 9.0,
To insert CD RedHat 9.0 and to choose "Installation personalized" with the packages:
- Xwindows
- Gnome
- Editors
- Graphic Internet
- Web server
- Server SQL (to click on details and to add mysql (version 3.23 minimum) which is not there by defect)
- Waiter network
- Development tools
- Tools administration system
- Tools system
- Tools impressions
Total of the software installed since Cd RedHat: 1.463 MO
Complements:
Deposit all that you recover Ci below in/usr/local/src
* GD:
One will use Gd (
www.boutell.com). The current version (2.0.5) can be installed and compiled since this site.
The libgd and libgd-devl must be installed since CD RedHat, because not installed by defect with the redhat 9. It must also include/understand:
rpm - I libpng * libjpeg * like Gd-progs-1.8.4-11 (for example) available in the form of rpm on
www.redhat.com
* NMAP:
A recent version of nmap (version 3.20 minimum) since
www.nmap.org, installable with:
rpm - vhU
http://download.insecure.org/nmap/di....48-1.i386.rpm
rpm - vhU
http://download.insecure.org/nmap/di....48-1.i386.rpm
* NETWORK:
Check that/etc/hosts contains in first a line:
- A.B.C.D machine.mondomaine.fr machine (often erroneous in Redhat), if not it will not be possible to contact waiter HTTP webmin via the interface Web.
- that the address of loopback (127.0.0.1) is well after the address of your machine
Nagios:
- to download the program heart and plugin since
www.nagios.org/download
- the plugin are in two RPM (plugins and will extras)
- the installation of will extras requires to install a RPM present in the contrib Nagios, radiusclient-0.3.1-1.i386.rpm
Nagmin
- telecharger the module nagmin since
http://www.nagios.org/download
- since
http://sourceforge.net/projects/nagmin (tar.gz)
Webmin
- to download webmin since
http://www.webmin.net in form RPM
================== fine of the recovery of parcellings =====================
Mysql
One will fix one with user root + password (it is not the same only root Unix)
one needs after throw installation three orders like root:
/usr/bin/mysql_install_db (which installs the tables by defect)
mysqladmin - U root - p password ' your-word-of-passe'
mysqladmin - U root - H your-machine - p password ' your-word-of-passe'
if you have a message of the style "machine XXXX is not authorized to use this Mysql waiter" with this last order, veiled the remedy:
mysql - U root - p
USE mysql;
UPDATE to use SET host=' XXXX.domain.mysuffix' WHERE host=' XXXX ';
FLUSH PRIVILEGES;
profit in to create the base (name nagios) which will store the infos of Nagios
mysqladmin - p' password' create nagios
and the two users who will be used in the support of Mysql by Nagios
mysql > GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP
- > ONE nagios. *
- > TO nagiosadm@localhost
- > IDENTIFIED BY ' word-of-passes ';
Query OK, 0 rows affected (0.00 dryness)
mysql > GRANT SELECT
- > ONE nagios. *
- > TO nagios@localhost
- > IDENTIFIED BY ' word-of-passes ';
Query OK, 0 rows affected (0.00 dryness)
Webmin installation (version 1.070 minimum)
Cd/usr/local/src
to check that Perl is well under/usr/local/bin/perl (if need be, to establish a link)
rpm - U webmin-XXXXX.rpm
To check that one can connect oneself to
http://machine:10000/with the password root of the machine.
Addition user nagios
adduser nagios
newgrp nagios
To install Nagios with sources
(NOTE: I tried to download the RPM made by Dag Wierrs in RH9 on several occasions: that probably goes, because one speaks about it in the forums. But the remote loading is very slow and I could not obtain a version usable)
Cd/usr/local/src
gunzip nagios-XXXX.gz
tar xvf nagios-XXXX.tar
Cd nagios-XXXX
/configure (possibly with options of the style -- with-cgiurl=/votre_url/cgi-bin -- with-htmurl=/votre_url -- with-command-to use -- with-command-grp)
If all were installed correctly previously, configures it must finish without error. In this example, the default options were selected. Type:
make nagios
make cgis
make install installs the binary ones
make install-config installs the files of configuration examples
make install-init installs the files of script of starting and stop of Nagios
make fullinstall does all.
Installation of a copy of the examples of * cfg-sample in/usr/local/nagios/etc/*.cfg
Cd/usr/local/nagios/etc
to mkdir samples
CP * samples
mv cgi.cfg-sample cgi.cfg
etc...
EXCEPT the file dependencies.cfg, which it is to better empty for the moment (size = 0 or to comment on with # all entrees)
Support of Mysql in Nagios
(NOTE: I tried to install it, but I have to make back machine, in raisond of a unsolved bug (Nagios is not able to be connected to the MySql base). In measurement or this support does not bring paramount functions to the operation of Nagios, this is not very serious. I leave here my examples for which would like to be tested there)
It is necessary to take again the files of configuration deposited by the makefile to indicate that one wishes a support of Mysql in Nagios
Publish (in/usr/local/nagios/etc) the files cgi.cfg and resource.cfg
Example of line to be replaced in cgi.cfg
xdddb_host=localhost
xdddb_port=3306
xdddb_database=nagios
xdddb_username=nagios
xdddb_password=mot-of-pass
Example of line to be replaced in resource.cfg
xcddb_host=localhost
xcddb_port=3306
xcddb_database=nagios
xcddb_username=nagiosadm
xcddb_password=mot-of-pass
xcddb_optimize_data=1
it does not remain any more which has recompiler nagios and the cgi. This will be done later, once nagmin installed
Attention, if you make a make fullinstall, or a make-install-config, you will crush the files which you have just modified)
Compilation of Nagios without the support of Mysql
Cd/usr/local/nagios-1.1
make clean
make nagios
make cgis
make install
make install
Installation of the plugin
Cd/usr/local/src
rpm - I nagios-plugin-XXX.rpm
Configuration of apache
Add these two paragraphs (in this order!) in the config of apache (/etc/httpd/conf/httpd.conf)
ScriptAlias/votre_url/cgi-bin// usr/local/nagios/sbin/
< Directory "/usr/local/nagios/sbin/">
AllowOverride AuthConfig
ExecCGI Options
Order allow, deny
Allow from all
</Directory >
Alias/votre_url// usr/local/nagios/share/
< Directory "/usr/local/nagios/share ">
None Options
AllowOverride AuthConfig
Order allow, deny
Allow from all
</Directory >
then define the users who will allow an authentification for the access to the Nagios waiter
In the repertory/usr/local/nagios/sbin and the repertory/usr/local/nagios/share, create the file htaccess container:
AuthName "Nagios Access"
AuthType BASIC
AuthUserFile/usr/local/nagios/etc/htpasswd.users
require valid-to use
Create the users who will have either an access admin (nagiosadm), or an invited access (guest)
htpasswd - C/usr/local/nagios/etc/htpasswd.users nagiosadm
htpasswd - C/usr/local/nagios/etc/htpasswd.users guest
and will redemarrez httpd
You must be able to see the
http://votre-machine/nagios page, same if none the menus give results.
The configuration of Nagios and Nagmin will make it possible to improve that.
Installation of nagmin:
to mkdir/usr/local/nagmin-2.0.5
Cd/usr/local/src
gunzip nagmin-XXXX.tar.gz,
tar xvf nagmin-XXXX.tar
CP/usr/local/src/nagmin-2.0.5/usr/local/nagmin-2.0.5
For the support of Mysql in Nagios (exclusively):
it is time of recompiler Nagios with the script provided by nagmin (build-nagios) in /usr/local/nagmin-2.0.5
Publish to go in/usr/local/src/nagios-1.1 (instead of/usr/local/nagios) and comment on the line make install-config
(attention, if you make a make fullinstall, or a make install-config, you will crush the files of configuration which you have just modified)
/build-nagios
Configuration of Nagmin
/setup
.....
# SETUP NagMIN DIRECTORIES
#
# NagMIN assume that you' Re using the standard Nagios
# directory structure. Make sure your nagios.cfg and cgi.cfg
# files are in ../nagios/etc before proceeding.
#
# NagMIN creates two new directories
# ../backup and ../nagmin for its own purposes.
#
# Enter the appropriate changes for your environment.
#
Enter database name
nagios):
Enter your Nagios ETC directory: (/usr/local/nagios/etc):
Enter your NagMIN root directory: (/usr/local/nagmin): /usr/local/nagmin-2.0.5
Nagios Configuration File: (/usr/local/nagios/etc/nagios.cfg):
CGI Configuration File: (/usr/local/nagios/etc/cgi.cfg):
NagMIN Database: nagios
Nagios ETC: /usr/local/nagios/etc/
NagMIN Root: /usr/local/nagmin-2.0.5
Nagios Config: /usr/local/nagios/etc/nagios.cfg
Nagios CGI: /usr/local/nagios/etc/cgi.cfg
NagMIN DB Dir: /usr/local/nagmin-2.0.5/nagios/
NagMIN CFG:
Continue(Y, q):
and to take the default value of all the other questions.
Nagmin is almost ready.
Installation of Nagmin in Webmin.
To open the Webmin page on
http://votremachine:10000
Go in Webmin Configuration, then Webmin Modules and install the module located on/usr/local/nagmin-2.0.5/nagmin-2.0.5.wbm
The basic configuration is finished. It is necessary from now on to configure Nagios for your environment.
The module is accessible in the Servers category.
In option (for the courageous ones: -))
Installation of rrdtools (which allows the posting of graph of traffic on equipment SNMP)
Since nagmin, one can accèder directly with the site of RRDTOOLS, and to download it in the form of RPM or of sources (in this case, HS configures -- prefix=/usr/local/rrdtool it to place or nagmin there awaits it by defect)
It also requires package NET::SNMP available on
www.cpan.org (in the form of sources. To extract and type Perl Makefile.pl, then make)
The installation is finished, it should now be leaned on the configuration of Nagios. The Nagmin module will simplify you the life by allowing an easier handling of the files of configuration.
RECOMMENDATION: plunge being maintained in Doc. Nagios, then in Doc. Nagmin before starting.
Here from which awaits you:
Basic configuration of Nagios (files nagios.cfg, cgi.cfg, resource.cfg )
Configuration of the waiter Nagios (hosts and services to be tested)
Choice of the "models" Nagios via Nagmin
Some tricks in more (it will be possibly supplemented thereafter):
The configuration of Nagmin requires porgresser in the order and by stages:
Correction of the bugs: -)
* nagmin 2.05 comprises a bug importation of the lines of the files of configuration of Nagios. The checking of Nagios indicates Pb on line 71 of the file of the orders
Go in small the commands, page 2
Remove the "return" in the orders notify-by-epager and start again the checking
* To define a model of contact (generic-contact) to allow has Nagios to make its checking (in ContactTemplates)
* executer le script nagios_mysql.sql dans la base nagios (via webmin) si vous utilisez le support de Mysql dans Nagios.
* vous devez d'abord définir la machine qui accueille nagios dans les hôtes, puis utilisez cette définition dans la table System de Nagmin
* Quand vous définirez des services, définissez un modèle PING et appliquez le par défaut à tous les hôtes (*)
* Définissez d'abord les modèles, les objets simples, puis les groupes d'objets.
Définition des horaires (time period)
format : 08:00-20:00 ou case vide
on peut définir un pour le travail hebdo, pour un personnel a temps partiel, etc. Attention: ce ci peut avoir un impact sur les remontées d'infos ( voir doc Nagios)
Définition des modèles de contacts
Définition des contacts
une meme personne peut avoir plusieurs définitions ( avec ou sans astreinte, etc)
Définition des groupes de contacts
etc...
______________________________________________________________
i am also trying the moment i get something i will post another article.