Make install-config not creating all sample configs?


#1

Howdy, I’m trying to install nagios on a RHEL3 box. I’ve been following the how to in word from the nagios documentation page.

When I run

[sthomson@alcott nagios-2.6]$ sudo make install-config

I get

/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/etc
/usr/bin/install -c -m 664 -o nagios -g nagios sample-config/nagios.cfg /usr/local/nagios/etc/nagios.cfg-sample
/usr/bin/install -c -m 664 -o nagios -g nagios sample-config/cgi.cfg /usr/local/nagios/etc/cgi.cfg-sample
/usr/bin/install -c -m 660 -o nagios -g nagios sample-config/resource.cfg /usr/local/nagios/etc/resource.cfg-sample
/usr/bin/install -c -m 664 -o nagios -g nagios sample-config/template-object/localhost.cfg /usr/local/nagios/etc/localhost.cfg-sample
/usr/bin/install -c -m 664 -o nagios -g nagios sample-config/template-object/commands.cfg /usr/local/nagios/etc/commands.cfg-sample

*** Sample config file installed ***

So I think I’m getting the sample config files, but I don’t think it creates a localconfig.cfg file, becuase when I try to run nagios I get this:

[sthomson@alcott etc]$ sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Nagios 2.6
Copyright © 1999-2006 Ethan Galstad (nagios.org)
Last Modified: 11-27-2006
License: GPL

Reading configuration data…

Error: Cannot open config file ‘/usr/local/nagios/etc/localhost.cfg’ for reading: No such file or directory

***> One or more problems was encountered while processing the config files…

I dont’ remember seeing a localhost.sample.cfg, but maybe I’m missing something here?

Thanks in advance,

Scott


#2

OOOOHHHHHHHHHHHHHHHHHHHHHH, I had it, I just wasn’t seeing it sitting there in front of me! :slight_smile:


#3

localconfig.cfg? What is that?
Followed the docs you say? OK, where does is say to make that file?
Anyway, the only files made by the install-config are samples. It’s up to you, how you want to name them. I suggest you don’t use an “all in one” file, like localhost.cfg or minimal.cfg.
nagios.sourceforge.net/download/ … config.png


#4

The reason you should bust up your configs, like shown, will become evident, when you have 50 contacts, 20 contactgroups, 1000 hosts, 6000 services, and on and on… All in one file? I don’t think so… It would be horrible to find something in it.


#5

localconfig.cfg? Must be something new in v2.6. In older versions, they called it minimal.cfg.
Still, I dont like the one file solution. Bust it up is much better.
I have heard of people creating one config file for every host though, and perhaps, that is what the developer has in mind. But would personally hate to have 1000 files in my etc directory.


#6

Yeah, I think it makes sense to have all your hosts in one file, and break out hte other bits, the other how to I found has the setup end up like that. I also saw that you can point it to a directory and have it treat everything in there as a specific config file. That seems like a neat trick, hopefully thats what my couterpart did when he set up his nagios, since he could then just send me my config files from his server essentially.

Thanks for the help, now to get the web working, I have it part way, but now I get this error after I click on config:

Error: Could not open CGI config file ‘/usr/local/nagios/etc/cgi.cfg’ for reading!


#7

most likely you have bad permissions on your etc/files.
they all should be -
rw-r–r-- 1 nagios nagios 11276 Nov 16 10:32 cgi.cfg