LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 12-14-2006, 10:17 PM   #1
immortaltechnique
Member
 
Registered: Oct 2006
Location: Kenya
Distribution: Ubuntu, RHEL, OpenBSD
Posts: 287

Rep: Reputation: 32
Nagios...anyone?


Hi i downloaded and installed nagios as per the documentation and i even configured apache correctly. I got up to the point where i viewed the welcome page but i cant go beyond that.
I get the following error message:
Code:
The requested URL /nagios/cgi-bin/tac.cgi was not found on this server.
Then when i restart nagios with the -v option i receive the following error:
Code:
Nagios 2.6 starting... (PID=4464)
Error: Unexpected token or statement in file '/usr/local/nagios/etc/hosts.cfg' o n line 2.
Bailing out due to one or more errors encountered in the configuration files.  R un Nagios from the command line with the -v option to verify your config before restarting. (PID=4464)
I wasnt able to see what the problem was since i didnt see in the manual anywhere it states about editing the hosts.cfg file.

Kindly help me out.
 
Old 12-15-2006, 04:09 AM   #2
xavpaice
LQ Newbie
 
Registered: Jun 2005
Location: New Zealand
Distribution: Suse, Red Hat, AIX
Posts: 12

Rep: Reputation: 0
in your nagios config dirs there's a bunch of files - in your nagios.cfg there's pointers to these files. The newer versions come with a minimal.cfg that is helpful to start off with.

Post your nagios.cfg for starters.

hosts.cfg is generally where you split out host definitions, services.cfg is for services... you get the idea. We use a cfg for each host, with all the services and host defns together - nagios.cfg points to the dir. Plenty of ways to skin a cat.
 
Old 12-15-2006, 05:15 AM   #3
immortaltechnique
Member
 
Registered: Oct 2006
Location: Kenya
Distribution: Ubuntu, RHEL, OpenBSD
Posts: 287

Original Poster
Rep: Reputation: 32
Men thanks for that.Actually i worked my way around the hosts.cfg file and now am stuck with one more error :
Code:
Error: Could not find a service matching host name 'jkuatdb' and description 'mysql'
Error: Could not expand member services specified in servicegroup (config file '/usr/local/nagios/etc/services.cfg', starting on line 20)
And here is my service group file:
Quote:
define servicegroup{
servicegroup_name dbservices
alias Database Services
members jkuatdb,mysql
}
 
Old 12-15-2006, 09:18 AM   #4
big_linux_geek
LQ Newbie
 
Registered: Jan 2005
Posts: 4

Rep: Reputation: 0
You'll need to fix your config files first. If the -v flag for nagios reports errors, nagios won't run. However, not being able to access your machine means that we cannot troubleshoot it. You should probably most the first several lines from your hosts.cfg config file.

Sometimes it's easiest to get one host working first until you get the hang of all the dependencies between the services/hosts/hostgroups/timeperiods/etc config files.
 
Old 12-15-2006, 09:30 AM   #5
immortaltechnique
Member
 
Registered: Oct 2006
Location: Kenya
Distribution: Ubuntu, RHEL, OpenBSD
Posts: 287

Original Poster
Rep: Reputation: 32
thanks for that i worked through the configuration files and now am narrowing down the errors and here is one that is really bugging me and i would really appreciate it if you could help me troubleshoot it:
Quote:
Error: Invalid max_check_attempts value for host 'localhosts'
Error: Could not register host (config file '/usr/local/nagios/etc/localhost.cfg', starting on line 175)
I dont seem to find where the error might be. Please.
 
Old 12-15-2006, 11:15 AM   #6
xavpaice
LQ Newbie
 
Registered: Jun 2005
Location: New Zealand
Distribution: Suse, Red Hat, AIX
Posts: 12

Rep: Reputation: 0
'localhosts' sounds like it should be 'localhost' - sounds daft but maybe there's a typo in one of your config files?

Without seeing your config files it's really hard to help here - the error is from a host registration in a config file somewhere - '/usr/local/nagios/etc/localhost.cfg' on line 175 sounds like a good place to look for starters.
 
Old 12-16-2006, 08:05 AM   #7
immortaltechnique
Member
 
Registered: Oct 2006
Location: Kenya
Distribution: Ubuntu, RHEL, OpenBSD
Posts: 287

Original Poster
Rep: Reputation: 32
I decided to reinstall nagios and i have done all the basic configurarions.
Now is it possible to atleast run a pre flight test and have no errors without changing much except the basic files? ie the nagios.cfg and the cgi.cfg?
Coz i configured my http.conf file and it is just displaying the welcome page plus the documentation.
When i start nagios i get the following error:
Quote:
Error: Command 'check-host-alive' has already been defined
Error: Could not register command (config file '/usr/local/nagios/etc/commands.cfg', starting on line 181)
Where could the above directive be defined again? I mean i only have one command.cfg file.
 
  


Reply

Tags
nagios


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
LXer: Nagios 2.5 and Oreon 1.3 (Nagios web front end) installation with screenshots LXer Syndicated Linux News 0 08-11-2006 05:33 PM
LXer: Nagios and Oreon (Nagios web front end) installation and Configuration LXer Syndicated Linux News 0 07-18-2006 08:33 PM
Nagios? suresheva31 Linux - General 2 10-13-2004 07:55 AM
Nagios VincentB Linux - Software 3 09-09-2003 09:20 AM
Nagios markus1982 Linux - Software 1 04-01-2003 06:04 AM


All times are GMT -5. The time now is 06:47 PM.

Main Menu
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