Adding Server crashes Website

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
toleolu
Posts: 294
Joined: Fri Jul 19, 2013 7:02 pm
Location: Honolulu Hawaii

Adding Server crashes Website

Post by toleolu »

I just inherited Nagios where I work a couple of weeks ago and so far I haven't really had any problems adding devices or editing config files, except for today.

I'm trying to add a new server, I define the server in hosts.cfg, I add it to hostgroups.cfg, and I define the Ping service in services.cfg. All this is done by just copying and pastng existing server configurations and just changing names and ip's where applicable.

When up upload the files to the Nagios server, all the hosts disappear from the website and all you see is:

It appears as though you do not have permission to view information for any of the hosts you requested...

If you believe this is an error, check the HTTP server authentication requirements for accessing this CGI
and check the authorization options in your CGI configuration file.

And when I verify the config, it says:

Error: Could not find host 'serverimtryingtoadd"
Error: Could not expand member hosts specified in hostgroup.. then it gives the path to my hostgroups.cfg file.

To fix the website, and those errors, I just delete that server from hostgroups.cfg, but the server is still defined in hosts.cfg, and services.cfg.

When I verify the config with the server deleted from hostgroups.cfg it verifies OK with the expected warning about the server I deleted from hostgroups not being a member of any host groups.

If the server I'm trying to add doesn't have a Nagios client installed on it, would that cause this? Long story as to why I am not able to determine if the client is installed or not, and I'm not getting any replies back from the people who manage that box.

Thanks
toleolu
Posts: 294
Joined: Fri Jul 19, 2013 7:02 pm
Location: Honolulu Hawaii

Re: Adding Server crashes Website

Post by toleolu »

Figured it out, somehow, the first letter in the server name was uppercase in hosts.cfg but it was lower case in hostgroups.cfg. Changed camel case in all three files and we're good.

I checked, double checked, and triple checked those names, but didn't see it. A co worker was looking at it and saw it.

Thanks again.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Adding Server crashes Website

Post by slansing »

Sometimes it's the little things, thanks for letting us know what your resolution was!
Locked