Nagios installation :(


#1

hi all.
a few hours ago i downloaded and installed nagios2.04b on FreeBSD5.4
but although i read the documentation, i still have some problems need to be cleared :frowning:
its the first time i am trying to use nagios. so i think it will be very hard to make it work beautifully.
installed nagios and plugins through ports.
but when i type nagios -v nagios.cfg some errors shown due to missing files below :

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

these arent available at all :frowning:
what should i do fellas ?
did i miss to install something important ?
please helppp …
urgent help needed :slight_smile:
bye for now.


#2

Look for the sample configurations files, at my place they are at /usr/local/nagios/etc/*.cfg-sample
Adjust nagios.cfg to the samples or copy/rename them.

Good luck…Kuffi


#3

I guess maybe when you were configuring nagios using ./configure you did not specify the --prefix=/dir/for/nagios if you did the u should locate the e.g. hosts.cfg-sample in the /dir/where/nagios/is/installed/etc then you create a folder inside that directory and make a copy of the *.cfg-sample (just in case :wink: ) then use the
mv hosts.cfg-sample hosts.cfg command to create the *.cfg files

enjoy!!!


#4

i didn’t use any ./configure option :frowning: cos i downloaded nagios from ports on FreeBSD. all packages were downloaded & installed & cleaned.
so i think files u mentioned are in correct folders i think ?

but when i try to run : # nagios -v nagios.cfg

errors encountered :frowning:

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

these files are missing :frowning:
checked that folder and saw none of above files !!!

and now wonder if i forgot to install some parts ?

any help for now ?


#5

The error is just as it’s stated, you have no .cfg files.
When you install from source, all of the config files are there, but they are named with a -sample at the end. These files are then meant to be copied to the above named files like contacts.cfg, etc. and modify there contents to be specific to your wishes.

In other words, ditch the “ports” and install from source, since we have no idea what your “ports” of nagios contain or don’t contain. Hopefully this is clear. So once more in case it isn’t. We don’t know anything about your “ports” of nagios. Install from source and follow the nagios installation documentation step by step.
Other than that, contact the “port” maker and ask for installation instructions if you won’t install from source code.
Edited Thu Nov 10 2005, 07:54AM ]


#6

The .cfg files are pretty essential for nagios to run. Without them, Nagios, won’t be able to monitor anything at all. Period. The hosts.cfg file identifies the network hosts you are attempting to monitor, the services.cfg file sets up the services to be monitored on each of the hosts…
There are sample .cfg files that come with Nagios, as I know has already been pointed out. I’m not familiar at all with FreeBSD (or even what FreeBSD is), so I can’t help you with that, but perhaps you can try compiling and installing nagios per the online documentation, using the commands given?