Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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
}
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.
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.
'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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.