Nagios installation :(

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.

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

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!!!

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 ?

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 ]

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?