LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 08-27-2003, 05:21 AM   #1
pnh73
Member
 
Registered: Jul 2003
Location: Birmingham, UK
Distribution: Ubuntu,Debian
Posts: 381

Rep: Reputation: 30
Angry Nagios and NagMIN problems


Hi,

I am trying to configure Nagios via the NagMIN interface, which so far has proved useful. When I click on 'Activate' it says all the checks have been passed with the following messages:

< --- START OF SNIP --- >

Activate Nagios Configuration
Synchronizing logo directories...
Processing Port Scans...
Processing Service Groups...
Creating Parent Dependencies...
/usr/bin/nagios -v -c /usr/local/nagmin/nagios/verify.cfg
Nagios 1.1
Copyright (c) 1999-2003 Ethan Galstad (nagios@nagios.org)
Last Modified: 06-02-2003
License: GPL

Reading configuration data...

Running pre-flight check on configuration data...

Checking services...
Checked 13 services.
Checking hosts...
Checked 1 hosts.
Checking host groups...
Checked 1 host groups.
Checking contacts...
Checked 1 contacts.
Checking contact groups...
Checked 2 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking host group escalations...
Checked 0 host group 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 24 commands.
Checking time periods...
Checked 4 time periods.
Checking for circular paths between hosts...
Checking for circular service execution dependencies...
Checking global event handlers...
Checking obsessive compulsive service processor command...
Checking misc settings...

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check

Copying files from /usr/local/nagmin/nagios to /etc/nagios

< --- END OF SNIP --- >

It then goes on to try and start Nagios. I then get a lot of errors about things that are not present in the configuration that i can edit and browse on the NagMIN. I am now very confused! None of the numbers correspond to the configuration i defined.

< --- START OF SNIP --- >

Restart Nagios (localhost)

Executing /etc/init.d/nagios restart
Running configuration check...
Nagios 1.1
Copyright (c) 1999-2003 Ethan Galstad (nagios@nagios.org)
Last Modified: 06-02-2003
License: GPL

Reading configuration data...

Running pre-flight check on configuration data...

Checking services...
Checked 38 services.
Checking hosts...
Checked 15 hosts.
Checking host groups...
Checked 6 host groups.
Checking contacts...
Checked 2 contacts.
Checking contact groups...
Checked 6 contact groups.
Checking service escalations...
Checked 2 service escalations.
Checking host group escalations...
Checked 2 host group escalations.
Checking service dependencies...
Error: Dependent service specified in service dependency for service 'Website #2' on host 'nt1' is not defined anywhere!
Error: Service specified in service dependency for service 'Website #2' on host 'nt1' is not defined anywhere!
Error: Service dependency definition for service 'Website #2' on host 'nt1' is circular (it depends on itself)!
Error: Dependent service specified in service dependency for service 'Website #2' on host 'nt1' is not defined anywhere!
Error: Service specified in service dependency for service 'Website #2' on host 'nt1' is not defined anywhere!
Error: Service dependency definition for service 'Website #2' on host 'nt1' is circular (it depends on itself)!
Error: Dependent service specified in service dependency for service 'Website #1' on host 'nt1' is not defined anywhere!
Error: Service specified in service dependency for service 'Website #1' on host 'nt1' is not defined anywhere!
Error: Service dependency definition for service 'Website #1' on host 'nt1' is circular (it depends on itself)!
Error: Dependent service specified in service dependency for service 'Website #1' on host 'nt1' is not defined anywhere!
Error: Service specified in service dependency for service 'Website #1' on host 'nt1' is not defined anywhere!
Error: Service dependency definition for service 'Website #1' on host 'nt1' is circular (it depends on itself)!
Checked 4 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 22 commands.
Checking time periods...
Checked 4 time periods.
Checking for circular paths between hosts...
Checking for circular service execution dependencies...
Checking global event handlers...
Checking obsessive compulsive service processor command...
Checking misc settings...

Total Warnings: 0
Total Errors: 12

***> One or more problems was encountered while running the pre-flight check...

Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation on the main and host config files, as well as the
'Whats New' section to find out what has changed.

failed - aborting restart.

< --- END OF SNIP --- >

The obvious thought to me is that it is trying to load some other config file, but i have no idea where it ould get that from. The anomaly is seen in the checking of service dependencies, in that in my configuration there are none! The verify procedure is processing the correct files, but the startup sequence isnt!

Any Help is much appreciated.

Paul
 
Old 09-16-2003, 03:46 AM   #2
barkeep8
LQ Newbie
 
Registered: Sep 2003
Posts: 1

Rep: Reputation: 0
NAGMin Problems with Nagios

I too am having problems with Nagmin and Nagios. I'm surprised at the lack of posts/info available with a google search on the words nadmin install. Can anyone help?
 
Old 09-16-2003, 12:47 PM   #3
pnh73
Member
 
Registered: Jul 2003
Location: Birmingham, UK
Distribution: Ubuntu,Debian
Posts: 381

Original Poster
Rep: Reputation: 30
Unhappy

I know, i gave up after a while. My server had a HDD failure and i decided to not install Nagmin back on
 
Old 01-11-2004, 03:34 PM   #4
cjdock
Member
 
Registered: Oct 2003
Distribution: slackware9.1
Posts: 44

Rep: Reputation: 15
Ya, nagmin is killing me. You guys look like you got further than me though. When I'm installing nagmin I get the below error when it tried to create the db. Through webmin I can create the db, I have a nagios user and password set up with what I guess is full permissions.
Any ideas?

Executing: mysql -unagios -pnagios < nagmin_drop.sql
ERROR 1045: Access denied for user: 'nagios@localhost' (Using password: YES)
Executing: mysql -unagios -pnagios < nagmin_load.sql
ERROR 1045: Access denied for user: 'nagios@localhost' (Using password: YES)
 
Old 01-18-2004, 07:01 PM   #5
cjdock
Member
 
Registered: Oct 2003
Distribution: slackware9.1
Posts: 44

Rep: Reputation: 15
Ok, so that last post was a mysql problem. Thats fixed now but then I had perl problems. Fixed that and then had a "verify" problem and then gave up...
Just venting my disapointment, the product had potential...
 
Old 01-26-2004, 09:50 PM   #6
dallasnewbie
LQ Newbie
 
Registered: Apr 2003
Location: dallas, texas
Distribution: rhel3 and fc2
Posts: 12

Rep: Reputation: 0
nagmin

i had trouble with all of the gui config tools. i found the easiest way was to use custom commands in webmin and just change the files like that. it elliminated the hassle of going from nagios to nagmin and back
 
Old 01-27-2004, 02:00 AM   #7
pnh73
Member
 
Registered: Jul 2003
Location: Birmingham, UK
Distribution: Ubuntu,Debian
Posts: 381

Original Poster
Rep: Reputation: 30
Hi,

I'm gonna be giving this another go soon. The documentation seems a little better than what I remember and I have increased my experience,

Will let you know
 
Old 11-20-2004, 05:28 AM   #8
ahmed4linux
LQ Newbie
 
Registered: Aug 2004
Posts: 23

Rep: Reputation: 15
nagmin-try

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 namenagios):
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problems with Nagios on check_overcr fcastells Linux - Software 0 10-26-2005 09:43 AM
Problems trying to start Nagios... shelby Linux - Software 15 10-02-2005 06:34 PM
Problems with nagios config ignus Linux - Software 4 07-26-2005 09:17 AM
my nagmin activation gives failure message sushilatlinux Linux - Software 0 10-26-2004 10:32 AM
Nagios, Nagmin installation marinovedder Linux - Software 1 09-29-2004 03:47 PM


All times are GMT -5. The time now is 08:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration