Object configuration problem


#1

I am a new user of Nagios working on Nagios 2.0. While configuring nagios I found the following files I have to create…

#cfg_file=/usr/local/nagios//etc/contactgroups.cfg
#cfg_file=/usr/local/nagios//etc/contacts.cfg
#cfg_file=/usr/local/nagios//etc/dependencies.cfg
#cfg_file=/usr/local/nagios//etc/escalations.cfg
#cfg_file=/usr/local/nagios//etc/hostgroups.cfg
#cfg_file=/usr/local/nagios//etc/hosts.cfg
#cfg_file=/usr/local/nagios//etc/services.cfg
#cfg_file=/usr/local/nagios//etc/timeperiods.cfg

These paths used //. What is the reason for this?
Can anybody help me by providing some sample cfg files of them, so that I can configure for my network.

Regards,
Fahim Nizam


#2

you’ll find the examples in minimal.cfg. (if you did “make install-config” while installing)
Check your initial configure command for the path problem, you probably put an extra / in some of the configure options.

Luca


#3

Yes, the reason you have that extra slash is because, when configuring Nagios, you ran this option:

“–prefix=/usr/local/nagios/”

That trailing slash will cause problems, as during the install, that slash is automatically added for you.

As this is the case, you should check out the rest of Nagios.cfg, as it is likely that there are paths with the double slash that you’ll need to fix.


#4

Thanks to u all. I have taken the minimal.cfg & bigger.cfg as examples and it does work…